Skip to content

Commit

Permalink
basic assert
Browse files Browse the repository at this point in the history
  • Loading branch information
Alen Siljak authored and rivaldi8 committed Jul 7, 2017
1 parent 5eec57c commit f87b456
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,14 @@ public void multiCurrencyTransactions_shouldResultInMultipleQifFiles(){
public void description_and_memo_field_test() {
// arrange

String expectedDescription = "my description";
String expectedMemo = "my memo";

AccountsDbAdapter accountsDbAdapter = new AccountsDbAdapter(mDb);
Account account = new Account("Basic Account");
Transaction transaction = new Transaction("One transaction");
transaction.setDescription("my description");
transaction.setNote("my note");
transaction.setDescription(expectedDescription);
transaction.setNote(expectedMemo);
account.addTransaction(transaction);
accountsDbAdapter.addRecord(account);

Expand All @@ -180,12 +183,12 @@ public void description_and_memo_field_test() {
try {
BufferedReader reader = new BufferedReader(new FileReader(file));
fileContentsBuilder.append(reader.readLine());
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
// todo: check the description & memo fields.
String fileContent = fileContentsBuilder.toString();
assertThat(fileContent.contains(expectedDescription));
assertThat(fileContent.contains(expectedMemo));
}
}

0 comments on commit f87b456

Please sign in to comment.