Validate that the *new* and *not played* are also exclusive

The FeedItem state is actually a tri-state, complement the test
coverage by checking that the state changes from *new* to
*not played*.
This commit is contained in:
Borjan Tchakaloff 2019-03-31 21:26:53 +02:00
parent 6ebf1defe7
commit c589bd2022
1 changed files with 11 additions and 0 deletions

View File

@ -62,6 +62,17 @@ public class FeedItemTest {
assertFalse(original.isNew());
}
/**
* Test that a new item loses that state after being marked as not played.
*/
@Test
public void testMarkNewItemAsNotPlayed_itemNotNew() {
original.setNew();
original.setPlayed(false);
assertFalse(original.isNew());
}
private void setNewFeedItemImageDownloadUrl() {
changedFeedItem.setImageUrl("http://example.com/new_picture");
}