mocks

package
v0.0.0-...-0e56039 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArticleRepositoryMock

type ArticleRepositoryMock struct {
	repository.Article
	mock.Mock
}

ArticleRepositoryMock mock for source struct

func (*ArticleRepositoryMock) GetNewTg

func (r *ArticleRepositoryMock) GetNewTg() []*domain.Article

GetNewTg returns new articles for telegram publisher

func (*ArticleRepositoryMock) MarkAsSentTG

func (r *ArticleRepositoryMock) MarkAsSentTG(article *domain.Article)

MarkAsSentTG returns new articles for telegram publisher

type ClientMock

type ClientMock struct {
	httpclient.Client
	mock.Mock
}

ClientMock mock for http client

func (*ClientMock) Get

func (c *ClientMock) Get(url string) (string, error)

Get mock function for get

func (*ClientMock) Post

func (c *ClientMock) Post(url string, body interface{}, headers map[string]string) error

Post mock function for post

type SourceMock

type SourceMock struct {
	source.Source
	mock.Mock
}

SourceMock mock for source struct

func (*SourceMock) ArticleFullTitle

func (s *SourceMock) ArticleFullTitle(title string) string

ArticleFullTitle mock function for source struct

func (*SourceMock) ArticleFullURL

func (s *SourceMock) ArticleFullURL(url string) string

ArticleFullURL mock function for source struct

func (*SourceMock) ArticleListItemHrefPattern

func (s *SourceMock) ArticleListItemHrefPattern() string

ArticleListItemHrefPattern mock function for source struct

func (*SourceMock) ArticleListItemPattern

func (s *SourceMock) ArticleListItemPattern() string

ArticleListItemPattern mock function for source struct

func (*SourceMock) ArticleListItemTitlePattern

func (s *SourceMock) ArticleListItemTitlePattern() string

ArticleListItemTitlePattern mock function for source struct

func (*SourceMock) ArticlePattern

func (s *SourceMock) ArticlePattern() string

ArticlePattern mock function for source struct

func (*SourceMock) Domain

func (s *SourceMock) Domain() string

Domain mock function for source struct

func (*SourceMock) Name

func (s *SourceMock) Name() string

Name mock function for source struct

func (*SourceMock) Path

func (s *SourceMock) Path() string

Path mock function for source struct

func (*SourceMock) ShouldSkipArticle

func (s *SourceMock) ShouldSkipArticle(url string) bool

ShouldSkipArticle mock function for source struct

type TagMatcherMock

type TagMatcherMock struct {
	parser.TagMatcher
	mock.Mock
}

TagMatcherMock mock for TagMatcher struct

func (*TagMatcherMock) MatchTags

func (t *TagMatcherMock) MatchTags(text string) []string

MatchTags mock method for TagMatcher struct

Jump to

Keyboard shortcuts

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