Skip to content

Commit

Permalink
Added simplistic unit-test for saved-status
Browse files Browse the repository at this point in the history
  • Loading branch information
Vogel612 committed Sep 26, 2015
1 parent 4bf0074 commit 4fcf3d0
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/test/java/de/vogel612/helper/ui/OverviewModelTest.java
@@ -1,7 +1,6 @@
package de.vogel612.helper.ui;

import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.*;
import static org.mockito.Mockito.*;

import org.junit.Before;
Expand Down Expand Up @@ -111,4 +110,15 @@ public void getSingleTranslation_returnsExpectedValues() {

assertEquals(expected[1], actual);
}

@Test
public void isNotSaved_isFalse_afterSaving() {
// abusing the loading test as setup
loadFromFile_andSuccessiveGet_returnCorrectInformation();
reset(p);

assertTrue(cut.isNotSaved());
cut.saveAll();
assertFalse(cut.isNotSaved());
}
}

0 comments on commit 4fcf3d0

Please sign in to comment.