File tree Expand file tree Collapse file tree
app/src/test/java/org/gnucash/android/test/unit/export Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -153,11 +153,14 @@ public void multiCurrencyTransactions_shouldResultInMultipleQifFiles(){
153153 public void description_and_memo_field_test () {
154154 // arrange
155155
156+ String expectedDescription = "my description" ;
157+ String expectedMemo = "my memo" ;
158+
156159 AccountsDbAdapter accountsDbAdapter = new AccountsDbAdapter (mDb );
157160 Account account = new Account ("Basic Account" );
158161 Transaction transaction = new Transaction ("One transaction" );
159- transaction .setDescription ("my description" );
160- transaction .setNote ("my note" );
162+ transaction .setDescription (expectedDescription );
163+ transaction .setNote (expectedMemo );
161164 account .addTransaction (transaction );
162165 accountsDbAdapter .addRecord (account );
163166
@@ -180,12 +183,12 @@ public void description_and_memo_field_test() {
180183 try {
181184 BufferedReader reader = new BufferedReader (new FileReader (file ));
182185 fileContentsBuilder .append (reader .readLine ());
183- } catch (FileNotFoundException e ) {
184- e .printStackTrace ();
185186 } catch (IOException e ) {
186187 e .printStackTrace ();
187188 }
188189 // todo: check the description & memo fields.
189190 String fileContent = fileContentsBuilder .toString ();
191+ assertThat (fileContent .contains (expectedDescription ));
192+ assertThat (fileContent .contains (expectedMemo ));
190193 }
191194}
You can’t perform that action at this time.
0 commit comments