Created
November 19, 2019 03:28
-
-
Save zapkub/e3f74cdd60113f881da75bd86306d16e to your computer and use it in GitHub Desktop.
Another appoarch of fake type
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Random interface { | |
Number(min, max int) int | |
String(char []byte) string | |
} | |
type FakeRandomPreparer struct { | |
} | |
func (f *FakeRandomPreparer) NumberAllAny() { | |
} | |
type FakeRandom struct { | |
Prepare *FakeRandomPreparer | |
} | |
func (f FakeRandom) Number(min, max int) int { | |
panic("implement me") | |
} | |
func (f FakeRandom) String(char []byte) string { | |
panic("implement me") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment