Extracted scenario

This commit is contained in:
Artyom Belousov 2021-06-06 11:00:50 +03:00
parent c02435ccaa
commit cc2058090c
13 changed files with 235 additions and 173 deletions

View file

@ -0,0 +1,19 @@
package scenario
import "errors"
type testCache struct {
table map[string]string
}
func (t *testCache) Get(cardName string) (string, error) {
msg, ok := t.table[cardName]
if !ok {
return "", errors.New("test")
}
return msg, nil
}
func (t *testCache) Set(cardName string, message string) {
t.table[cardName] = message
}