Skip to content

Commit

Permalink
Step #A2-10: Final pin-down tests for 100% coverage Branch Coverage.
Browse files Browse the repository at this point in the history
  • Loading branch information
mohamed-taman committed Sep 26, 2020
1 parent 8a2849f commit d099f5e
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Gilded Rose/src/test/java/com/gildedrose/GildedRoseTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -98,5 +98,23 @@ void backstagePassMaximumQuality() {

item = createAndUpdate("Backstage passes to a TAFKAL80ETC concert", 10, 49);
assertEquals(50, item.quality);

item = createAndUpdate("Backstage passes to a TAFKAL80ETC concert", 5, 49);
assertEquals(50, item.quality);
}

@Test
void degradeInQualityUnlessSulfuras() {
Item item = createAndUpdate("foo", -1, 1);
assertEquals(0, item.quality);

item = createAndUpdate("Sulfuras, Hand of Ragnaros", -1, 1);
assertEquals(1, item.quality);
}

@Test
void agedBrieMaximumQuality() {
Item item = createAndUpdate("Aged Brie", -1, 49);
assertEquals(50, item.quality);
}
}

0 comments on commit d099f5e

Please sign in to comment.