mocks

package
v0.3.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 29, 2020 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Package mocks is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockConnectivityTester

type MockConnectivityTester struct {
	// contains filtered or unexported fields
}

MockConnectivityTester is a mock of ConnectivityTester interface

func NewMockConnectivityTester

func NewMockConnectivityTester(ctrl *gomock.Controller) *MockConnectivityTester

NewMockConnectivityTester creates a new mock instance

func (*MockConnectivityTester) ClearBrowser

func (m *MockConnectivityTester) ClearBrowser()

ClearBrowser mocks base method

func (*MockConnectivityTester) EXPECT

EXPECT returns an object that allows the caller to indicate expected use

func (*MockConnectivityTester) Invalidate added in v0.3.10

func (m *MockConnectivityTester) Invalidate(url string)

Invalidate mocks base method

func (*MockConnectivityTester) IsOk added in v0.3.10

func (m *MockConnectivityTester) IsOk(url string) bool

IsOk mocks base method

func (*MockConnectivityTester) IsOkAndSet

func (m *MockConnectivityTester) IsOkAndSet(u string, f func() bool) bool

IsOkAndSet mocks base method

func (*MockConnectivityTester) SetBrowser

func (m *MockConnectivityTester) SetBrowser(bow browser.Browsable)

SetBrowser mocks base method

func (*MockConnectivityTester) Test

func (m *MockConnectivityTester) Test(u string) error

Test mocks base method

type MockConnectivityTesterMockRecorder

type MockConnectivityTesterMockRecorder struct {
	// contains filtered or unexported fields
}

MockConnectivityTesterMockRecorder is the mock recorder for MockConnectivityTester

func (*MockConnectivityTesterMockRecorder) ClearBrowser

func (mr *MockConnectivityTesterMockRecorder) ClearBrowser() *gomock.Call

ClearBrowser indicates an expected call of ClearBrowser

func (*MockConnectivityTesterMockRecorder) Invalidate added in v0.3.10

func (mr *MockConnectivityTesterMockRecorder) Invalidate(url interface{}) *gomock.Call

Invalidate indicates an expected call of Invalidate

func (*MockConnectivityTesterMockRecorder) IsOk added in v0.3.10

func (mr *MockConnectivityTesterMockRecorder) IsOk(url interface{}) *gomock.Call

IsOk indicates an expected call of IsOk

func (*MockConnectivityTesterMockRecorder) IsOkAndSet

func (mr *MockConnectivityTesterMockRecorder) IsOkAndSet(u, f interface{}) *gomock.Call

IsOkAndSet indicates an expected call of IsOkAndSet

func (*MockConnectivityTesterMockRecorder) SetBrowser

func (mr *MockConnectivityTesterMockRecorder) SetBrowser(bow interface{}) *gomock.Call

SetBrowser indicates an expected call of SetBrowser

func (*MockConnectivityTesterMockRecorder) Test

func (mr *MockConnectivityTesterMockRecorder) Test(u interface{}) *gomock.Call

Test indicates an expected call of Test

type MockedBrowser added in v0.3.10

type MockedBrowser struct {
	CanOpen bool
	// contains filtered or unexported fields
}

func (*MockedBrowser) AddRequestHeader added in v0.3.10

func (b *MockedBrowser) AddRequestHeader(string, string)

AddRequestHeader adds a header the browser sends with each request.

func (*MockedBrowser) Back added in v0.3.10

func (b *MockedBrowser) Back() bool

Back loads the previously requested page.

func (*MockedBrowser) Body added in v0.3.10

func (b *MockedBrowser) Body() string

Body returns the page body as a string of html.

func (*MockedBrowser) Bookmark added in v0.3.10

func (b *MockedBrowser) Bookmark(string) error

Bookmark saves the page URL in the bookmarks with the given name.

func (*MockedBrowser) BookmarksJar added in v0.3.10

func (b *MockedBrowser) BookmarksJar() jar.BookmarksJar

BookmarksJar returns the bookmarks jar the browser uses.

func (*MockedBrowser) Click added in v0.3.10

func (b *MockedBrowser) Click(string) error

Click clicks on the page element matched by the given expression.

func (*MockedBrowser) CookieJar added in v0.3.10

func (b *MockedBrowser) CookieJar() http.CookieJar

CookieJar returns the cookie jar the browser uses.

func (*MockedBrowser) Dom added in v0.3.10

func (b *MockedBrowser) Dom() *goquery.Selection

Dom returns the inner *goquery.Selection.

func (*MockedBrowser) Download added in v0.3.10

func (b *MockedBrowser) Download(io.Writer) (int64, error)

Download writes the contents of the document to the given writer.

func (*MockedBrowser) Find added in v0.3.10

Find returns the dom selections matching the given expression.

func (*MockedBrowser) Form added in v0.3.10

Form returns the form in the current page that matches the given expr.

func (*MockedBrowser) Forms added in v0.3.10

func (b *MockedBrowser) Forms() []browser.Submittable

Forms returns an array of every form in the page.

func (*MockedBrowser) Head added in v0.3.10

func (b *MockedBrowser) Head(string) error

Open requests the given URL using the HEAD method.

func (*MockedBrowser) HistoryJar added in v0.3.10

func (b *MockedBrowser) HistoryJar() jar.History

HistoryJar returns the history jar the browser uses.

func (*MockedBrowser) Images added in v0.3.10

func (b *MockedBrowser) Images() []*browser.Image

Images returns an array of every image found in the page.

func (b *MockedBrowser) Links() []*browser.Link

Links returns an array of every link found in the page.

func (*MockedBrowser) NewTab added in v0.3.10

func (b *MockedBrowser) NewTab() (bx *browser.Browser)

Create a new Browser instance and inherit the configuration Read more: https://github.com/headzoo/surf/issues/23

func (*MockedBrowser) Open added in v0.3.10

func (b *MockedBrowser) Open(string) error

Open requests the given URL using the GET method.

func (*MockedBrowser) OpenBookmark added in v0.3.10

func (b *MockedBrowser) OpenBookmark(string) error

OpenBookmark calls Get() with the URL for the bookmark with the given name.

func (*MockedBrowser) OpenForm added in v0.3.10

func (b *MockedBrowser) OpenForm(string, url.Values) error

OpenForm appends the data values to the given URL and sends a GET request.

func (*MockedBrowser) Post added in v0.3.10

Post requests the given URL using the POST method.

func (*MockedBrowser) PostForm added in v0.3.10

func (b *MockedBrowser) PostForm(string, url.Values) error

PostForm requests the given URL using the POST method with the given data.

func (*MockedBrowser) PostMultipart added in v0.3.10

func (b *MockedBrowser) PostMultipart(string, url.Values, browser.FileSet) error

PostMultipart requests the given URL using the POST method with the given data using multipart/form-data format.

func (*MockedBrowser) Reload added in v0.3.10

func (b *MockedBrowser) Reload() error

Reload duplicates the last successful request.

func (*MockedBrowser) ResolveStringUrl added in v0.3.10

func (b *MockedBrowser) ResolveStringUrl(string) (string, error)

ResolveStringUrl works just like ResolveUrl, but the argument and return value are strings.

func (*MockedBrowser) ResolveUrl added in v0.3.10

func (b *MockedBrowser) ResolveUrl(*url.URL) *url.URL

ResolveUrl returns an absolute URL for a possibly relative URL.

func (*MockedBrowser) ResponseHeaders added in v0.3.10

func (b *MockedBrowser) ResponseHeaders() http.Header

ResponseHeaders returns the page headers.

func (*MockedBrowser) Scripts added in v0.3.10

func (b *MockedBrowser) Scripts() []*browser.Script

Scripts returns an array of every script linked to the document.

func (*MockedBrowser) SetAttribute added in v0.3.10

func (b *MockedBrowser) SetAttribute(_ browser.Attribute, _ bool)

SetAttribute sets a browser instruction attribute.

func (*MockedBrowser) SetAttributes added in v0.3.10

func (b *MockedBrowser) SetAttributes(_ browser.AttributeMap)

SetAttributes is used to set all the browser attributes.

func (*MockedBrowser) SetBookmarksJar added in v0.3.10

func (b *MockedBrowser) SetBookmarksJar(_ jar.BookmarksJar)

SetBookmarksJar sets the bookmarks jar the browser uses.

func (*MockedBrowser) SetCookieJar added in v0.3.10

func (b *MockedBrowser) SetCookieJar(_ http.CookieJar)

SetCookieJar is used to set the cookie jar the browser uses.

func (*MockedBrowser) SetEncoding added in v0.3.10

func (b *MockedBrowser) SetEncoding(_ string)

SetEncoding sets the encoding to use after a page is fetched

func (*MockedBrowser) SetHeadersJar added in v0.3.10

func (b *MockedBrowser) SetHeadersJar(_ http.Header)

SetHeadersJar sets the headers the browser sends with each request.

func (*MockedBrowser) SetHistoryJar added in v0.3.10

func (b *MockedBrowser) SetHistoryJar(_ jar.History)

SetHistoryJar is used to set the history jar the browser uses.

func (*MockedBrowser) SetRateLimit added in v0.3.10

func (b *MockedBrowser) SetRateLimit(_ int)

func (*MockedBrowser) SetState added in v0.3.10

func (b *MockedBrowser) SetState(state *jar.State)

SetState sets the init browser state.

func (*MockedBrowser) SetTimeout added in v0.3.10

func (b *MockedBrowser) SetTimeout(_ time.Duration)

SetTimeout sets the timeout for requests.

func (*MockedBrowser) SetTransport added in v0.3.10

func (b *MockedBrowser) SetTransport(http.RoundTripper)

SetTransport sets the http library transport mechanism for each request.

func (*MockedBrowser) SetUserAgent added in v0.3.10

func (b *MockedBrowser) SetUserAgent(_ string)

SetUserAgent sets the user agent.

func (*MockedBrowser) SiteCookies added in v0.3.10

func (b *MockedBrowser) SiteCookies() []*http.Cookie

SiteCookies returns the cookies for the current site.

func (*MockedBrowser) State added in v0.3.10

func (b *MockedBrowser) State() *jar.State

State returns the browser state.

func (*MockedBrowser) StatusCode added in v0.3.10

func (b *MockedBrowser) StatusCode() int

StatusCode returns the response status code.

func (*MockedBrowser) Stylesheets added in v0.3.10

func (b *MockedBrowser) Stylesheets() []*browser.Stylesheet

Stylesheets returns an array of every stylesheet linked to the document.

func (*MockedBrowser) Title added in v0.3.10

func (b *MockedBrowser) Title() string

Title returns the page title.

func (*MockedBrowser) Url added in v0.3.10

func (b *MockedBrowser) Url() *url.URL

Url returns the page URL as a string.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL