forked from ebhomengo/niki
1
0
Fork 0
NIKI - EBHOME NGO Core Service.
Go to file
Ruhollah fb4bd97c5c feat(validator): implement unit test for admin login validator (#109) 2024-08-06 15:56:40 +03:30
adapter fix(niki): internal, validator and structure refactor 2024-08-03 14:37:16 +03:30
config fix(niki): internal, validator and structure refactor 2024-08-03 14:37:16 +03:30
contract/sms fix(niki): internal, validator and structure refactor 2024-08-03 14:37:16 +03:30
delivery/http_server fix(niki): internal, validator and structure refactor 2024-08-03 14:37:16 +03:30
deploy feat(niki): dockerize niki 2024-04-28 11:28:33 +03:30
docs feat(validator): implement unit test for admin login validator (#109) 2024-08-06 15:56:40 +03:30
entity fix(niki): internal, validator and structure refactor 2024-08-03 14:37:16 +03:30
logger feat(niki): added rtx-linter-format 2023-12-20 19:09:25 +03:30
param fix(niki): internal, validator and structure refactor 2024-08-03 14:37:16 +03:30
pkg feat(niki): partially implemented kind box req accepted notification 2024-07-27 20:49:53 +03:30
repository fix(niki): internal, validator and structure refactor 2024-08-03 14:37:16 +03:30
service fix(niki): internal, validator and structure refactor 2024-08-03 14:37:16 +03:30
validator feat(validator): implement unit test for admin login validator (#109) 2024-08-06 15:56:40 +03:30
.env.example feat(niki): add swagger not completed 2024-05-14 16:37:09 +03:30
.gitignore fix(niki): internal, validator and structure refactor 2024-08-03 14:37:16 +03:30
.golangci.yml style(niki): apply code formatting and linting (#85) 2024-07-25 03:15:04 +03:30
.mise.toml feat(niki): add swagger not completed 2024-05-14 16:37:09 +03:30
.mockery.yaml feat(validator): implement unit test for admin login validator (#109) 2024-08-06 15:56:40 +03:30
Dockerfile feat(niki): dockerize niki 2024-04-28 11:28:33 +03:30
Makefile feat(niki): add compile daemon (hot reload) and separate migration commands (#88) 2024-07-15 15:26:14 +03:30
config.yml fix(niki): internal, validator and structure refactor 2024-08-03 14:37:16 +03:30
docker-compose.dev.yaml feat(niki): add test for add benefactor kind_box_req 2024-04-24 14:19:57 +03:30
docker-compose.yaml feat(niki): add swagger not completed 2024-05-14 16:37:09 +03:30
go.mod feat(validator): implement unit test for admin login validator (#109) 2024-08-06 15:56:40 +03:30
go.sum feat(validator): implement unit test for admin login validator (#109) 2024-08-06 15:56:40 +03:30
main.go fix(niki): internal, validator and structure refactor 2024-08-03 14:37:16 +03:30

docs/README.md

Mocking interfaces in unit tests

1- add a //go:generate directive above the interface:

//go:generate mockery --name Repository
type Repository interface {
	AdminExistByPhoneNumber(ctx context.Context, phoneNumber string) (bool, error)
	AdminExistByEmail(ctx context.Context, email string) (bool, error)
}

2- run go generate to create the mock files:

go generate ./...

3- use the generated mock types in your tests.

for more information visit: https://vektra.github.io/mockery/latest/