jeudi 19 janvier 2017

Make mock gin.Context in Golang

Sorry about my English

I'm writing a REST API using the Gin framework. But I'm having trouble testing my controllers, researching a bit about TDD and Mock, I tried to apply them but I could not.

I created a very reduced test environment in which I needed help creating the controller test. How do I create a Mock from Gin.Context?

Here's my example code: testGinContextMock

My test example: TestControllerGetAll

Aucun commentaire:

Enregistrer un commentaire