Skip to content

Instantly share code, notes, and snippets.

@izmajlowiczl
Created January 4, 2017 21:43
Show Gist options
  • Save izmajlowiczl/c039cc3f98a8f07a3669c7343095e783 to your computer and use it in GitHub Desktop.
Save izmajlowiczl/c039cc3f98a8f07a3669c7343095e783 to your computer and use it in GitHub Desktop.
@Test
public void listWallets() {
Wallet bankWallet = Wallet.create(randomUUID(), "bank");
Wallet ccWallet = Wallet.create(randomUUID(), "credit card");
db.execSQL(storeWalletSql(bankWallet));
db.execSQL(storeWalletSql(ccWallet));
assertThat(storage.list()).containsExactly(bankWallet, ccWallet);
}
private String storeWalletSql(Wallet wallet) {
return String.format("INSERT INTO tbl_wallet VALUES ('%s', '%s');", wallet.uuid().toString(), wallet.name());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment