17 lines
209 B
Go
17 lines
209 B
Go
|
package wallet
|
||
|
|
||
|
import "testing"
|
||
|
|
||
|
func TestWallet(t *testing.T) {
|
||
|
wallet := Wallet{}
|
||
|
|
||
|
wallet.Deposit(10)
|
||
|
|
||
|
got := wallet.Balance()
|
||
|
want := 10
|
||
|
|
||
|
if got != want {
|
||
|
t.Errorf("got %d want %d", got, want)
|
||
|
}
|
||
|
}
|