jonwho / go-iex

IEX Cloud API client in Go
MIT License
6 stars 3 forks source link

make reliable tests #3

Closed jonwho closed 5 years ago

jonwho commented 5 years ago

this will require mocks.

for different times of the day the api will return different values

mock these requests

jonwho commented 5 years ago

looks like go convention is to make interfaces for object under test and then to generate a mock for that object. since this is directly related IEX can just save the JSON returns to a file and read from that file to test go structs.

mock & mockgen not necessary