omrfrkazt / golang-generic-repository-pattern

Golang | Generic Repository Pattern
31 stars 5 forks source link

Unit tests #1

Open vlio20 opened 1 year ago

vlio20 commented 1 year ago

Hi, The repository looks awesome! It would be great if you could share some unit test examples, especially for the userHandler. I am mainly interested in how you would mock, for example, the repository import.

omrfrkazt commented 1 year ago

Hello, Thanks, lets create tests with mocks, i want to use testify for tests, some details https://github.com/stretchr/testify

vlio20 commented 1 year ago

@omrfrkazt so I am pretty new to go, and mostly looking for best practices. I would be happy to add tests to this project but I will need to see at least one example.

omrfrkazt commented 1 year ago

okay i will show you an example for it