2024-09-11 09:08:53 +00:00
|
|
|
package wallet
|
|
|
|
|
|
|
|
import "testing"
|
|
|
|
|
|
|
|
func TestWallet(t *testing.T) {
|
|
|
|
wallet := Wallet{}
|
|
|
|
|
|
|
|
wallet.Deposit(10)
|
|
|
|
|
|
|
|
got := wallet.Balance()
|
2024-09-11 09:15:24 +00:00
|
|
|
want := Bitcoin(10)
|
2024-09-11 09:08:53 +00:00
|
|
|
|
|
|
|
if got != want {
|
2024-09-11 09:17:23 +00:00
|
|
|
t.Errorf("got %q want %q", got, want)
|
2024-09-11 09:08:53 +00:00
|
|
|
}
|
|
|
|
}
|