mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-05 17:51:51 +00:00
t 100% line and branch coverage
This commit is contained in:
parent
08ddffce6d
commit
ad629f6a31
@ -1,9 +1,21 @@
|
||||
args: ('foo', -1, -1) => 'foo, -2, -1'
|
||||
args: ('foo', -1, 0) => 'foo, -2, 0'
|
||||
args: ('foo', -1, 1) => 'foo, -2, 0'
|
||||
args: ('foo', -1, 49) => 'foo, -2, 47'
|
||||
args: ('foo', -1, 50) => 'foo, -2, 48'
|
||||
args: ('foo', -1, 51) => 'foo, -2, 49'
|
||||
args: ('foo', 0, -1) => 'foo, -1, -1'
|
||||
args: ('foo', 0, 0) => 'foo, -1, 0'
|
||||
args: ('foo', 0, 1) => 'foo, -1, 0'
|
||||
args: ('foo', 0, 49) => 'foo, -1, 47'
|
||||
args: ('foo', 0, 50) => 'foo, -1, 48'
|
||||
args: ('foo', 0, 51) => 'foo, -1, 49'
|
||||
args: ('foo', 1, -1) => 'foo, 0, -1'
|
||||
args: ('foo', 1, 0) => 'foo, 0, 0'
|
||||
args: ('foo', 1, 1) => 'foo, 0, 0'
|
||||
args: ('foo', 1, 49) => 'foo, 0, 48'
|
||||
args: ('foo', 1, 50) => 'foo, 0, 49'
|
||||
args: ('foo', 1, 51) => 'foo, 0, 50'
|
||||
args: ('foo', 10, -1) => 'foo, 9, -1'
|
||||
args: ('foo', 10, 0) => 'foo, 9, 0'
|
||||
args: ('foo', 10, 1) => 'foo, 9, 0'
|
||||
@ -22,12 +34,24 @@ args: ('foo', 12, 1) => 'foo, 11, 0'
|
||||
args: ('foo', 12, 49) => 'foo, 11, 48'
|
||||
args: ('foo', 12, 50) => 'foo, 11, 49'
|
||||
args: ('foo', 12, 51) => 'foo, 11, 50'
|
||||
args: ('Aged Brie', -1, -1) => 'Aged Brie, -2, 1'
|
||||
args: ('Aged Brie', -1, 0) => 'Aged Brie, -2, 2'
|
||||
args: ('Aged Brie', -1, 1) => 'Aged Brie, -2, 3'
|
||||
args: ('Aged Brie', -1, 49) => 'Aged Brie, -2, 50'
|
||||
args: ('Aged Brie', -1, 50) => 'Aged Brie, -2, 50'
|
||||
args: ('Aged Brie', -1, 51) => 'Aged Brie, -2, 51'
|
||||
args: ('Aged Brie', 0, -1) => 'Aged Brie, -1, 1'
|
||||
args: ('Aged Brie', 0, 0) => 'Aged Brie, -1, 2'
|
||||
args: ('Aged Brie', 0, 1) => 'Aged Brie, -1, 3'
|
||||
args: ('Aged Brie', 0, 49) => 'Aged Brie, -1, 50'
|
||||
args: ('Aged Brie', 0, 50) => 'Aged Brie, -1, 50'
|
||||
args: ('Aged Brie', 0, 51) => 'Aged Brie, -1, 51'
|
||||
args: ('Aged Brie', 1, -1) => 'Aged Brie, 0, 0'
|
||||
args: ('Aged Brie', 1, 0) => 'Aged Brie, 0, 1'
|
||||
args: ('Aged Brie', 1, 1) => 'Aged Brie, 0, 2'
|
||||
args: ('Aged Brie', 1, 49) => 'Aged Brie, 0, 50'
|
||||
args: ('Aged Brie', 1, 50) => 'Aged Brie, 0, 50'
|
||||
args: ('Aged Brie', 1, 51) => 'Aged Brie, 0, 51'
|
||||
args: ('Aged Brie', 10, -1) => 'Aged Brie, 9, 0'
|
||||
args: ('Aged Brie', 10, 0) => 'Aged Brie, 9, 1'
|
||||
args: ('Aged Brie', 10, 1) => 'Aged Brie, 9, 2'
|
||||
@ -46,12 +70,24 @@ args: ('Aged Brie', 12, 1) => 'Aged Brie, 11, 2'
|
||||
args: ('Aged Brie', 12, 49) => 'Aged Brie, 11, 50'
|
||||
args: ('Aged Brie', 12, 50) => 'Aged Brie, 11, 50'
|
||||
args: ('Aged Brie', 12, 51) => 'Aged Brie, 11, 51'
|
||||
args: ('Backstage passes to a TAFKAL80ETC concert', -1, -1) => 'Backstage passes to a TAFKAL80ETC concert, -2, 0'
|
||||
args: ('Backstage passes to a TAFKAL80ETC concert', -1, 0) => 'Backstage passes to a TAFKAL80ETC concert, -2, 0'
|
||||
args: ('Backstage passes to a TAFKAL80ETC concert', -1, 1) => 'Backstage passes to a TAFKAL80ETC concert, -2, 0'
|
||||
args: ('Backstage passes to a TAFKAL80ETC concert', -1, 49) => 'Backstage passes to a TAFKAL80ETC concert, -2, 0'
|
||||
args: ('Backstage passes to a TAFKAL80ETC concert', -1, 50) => 'Backstage passes to a TAFKAL80ETC concert, -2, 0'
|
||||
args: ('Backstage passes to a TAFKAL80ETC concert', -1, 51) => 'Backstage passes to a TAFKAL80ETC concert, -2, 0'
|
||||
args: ('Backstage passes to a TAFKAL80ETC concert', 0, -1) => 'Backstage passes to a TAFKAL80ETC concert, -1, 0'
|
||||
args: ('Backstage passes to a TAFKAL80ETC concert', 0, 0) => 'Backstage passes to a TAFKAL80ETC concert, -1, 0'
|
||||
args: ('Backstage passes to a TAFKAL80ETC concert', 0, 1) => 'Backstage passes to a TAFKAL80ETC concert, -1, 0'
|
||||
args: ('Backstage passes to a TAFKAL80ETC concert', 0, 49) => 'Backstage passes to a TAFKAL80ETC concert, -1, 0'
|
||||
args: ('Backstage passes to a TAFKAL80ETC concert', 0, 50) => 'Backstage passes to a TAFKAL80ETC concert, -1, 0'
|
||||
args: ('Backstage passes to a TAFKAL80ETC concert', 0, 51) => 'Backstage passes to a TAFKAL80ETC concert, -1, 0'
|
||||
args: ('Backstage passes to a TAFKAL80ETC concert', 1, -1) => 'Backstage passes to a TAFKAL80ETC concert, 0, 2'
|
||||
args: ('Backstage passes to a TAFKAL80ETC concert', 1, 0) => 'Backstage passes to a TAFKAL80ETC concert, 0, 3'
|
||||
args: ('Backstage passes to a TAFKAL80ETC concert', 1, 1) => 'Backstage passes to a TAFKAL80ETC concert, 0, 4'
|
||||
args: ('Backstage passes to a TAFKAL80ETC concert', 1, 49) => 'Backstage passes to a TAFKAL80ETC concert, 0, 50'
|
||||
args: ('Backstage passes to a TAFKAL80ETC concert', 1, 50) => 'Backstage passes to a TAFKAL80ETC concert, 0, 50'
|
||||
args: ('Backstage passes to a TAFKAL80ETC concert', 1, 51) => 'Backstage passes to a TAFKAL80ETC concert, 0, 51'
|
||||
args: ('Backstage passes to a TAFKAL80ETC concert', 10, -1) => 'Backstage passes to a TAFKAL80ETC concert, 9, 1'
|
||||
args: ('Backstage passes to a TAFKAL80ETC concert', 10, 0) => 'Backstage passes to a TAFKAL80ETC concert, 9, 2'
|
||||
args: ('Backstage passes to a TAFKAL80ETC concert', 10, 1) => 'Backstage passes to a TAFKAL80ETC concert, 9, 3'
|
||||
@ -70,12 +106,24 @@ args: ('Backstage passes to a TAFKAL80ETC concert', 12, 1) => 'Backstage passes
|
||||
args: ('Backstage passes to a TAFKAL80ETC concert', 12, 49) => 'Backstage passes to a TAFKAL80ETC concert, 11, 50'
|
||||
args: ('Backstage passes to a TAFKAL80ETC concert', 12, 50) => 'Backstage passes to a TAFKAL80ETC concert, 11, 50'
|
||||
args: ('Backstage passes to a TAFKAL80ETC concert', 12, 51) => 'Backstage passes to a TAFKAL80ETC concert, 11, 51'
|
||||
args: ('Sulfuras, Hand of Ragnaros', -1, -1) => 'Sulfuras, Hand of Ragnaros, -1, -1'
|
||||
args: ('Sulfuras, Hand of Ragnaros', -1, 0) => 'Sulfuras, Hand of Ragnaros, -1, 0'
|
||||
args: ('Sulfuras, Hand of Ragnaros', -1, 1) => 'Sulfuras, Hand of Ragnaros, -1, 1'
|
||||
args: ('Sulfuras, Hand of Ragnaros', -1, 49) => 'Sulfuras, Hand of Ragnaros, -1, 49'
|
||||
args: ('Sulfuras, Hand of Ragnaros', -1, 50) => 'Sulfuras, Hand of Ragnaros, -1, 50'
|
||||
args: ('Sulfuras, Hand of Ragnaros', -1, 51) => 'Sulfuras, Hand of Ragnaros, -1, 51'
|
||||
args: ('Sulfuras, Hand of Ragnaros', 0, -1) => 'Sulfuras, Hand of Ragnaros, 0, -1'
|
||||
args: ('Sulfuras, Hand of Ragnaros', 0, 0) => 'Sulfuras, Hand of Ragnaros, 0, 0'
|
||||
args: ('Sulfuras, Hand of Ragnaros', 0, 1) => 'Sulfuras, Hand of Ragnaros, 0, 1'
|
||||
args: ('Sulfuras, Hand of Ragnaros', 0, 49) => 'Sulfuras, Hand of Ragnaros, 0, 49'
|
||||
args: ('Sulfuras, Hand of Ragnaros', 0, 50) => 'Sulfuras, Hand of Ragnaros, 0, 50'
|
||||
args: ('Sulfuras, Hand of Ragnaros', 0, 51) => 'Sulfuras, Hand of Ragnaros, 0, 51'
|
||||
args: ('Sulfuras, Hand of Ragnaros', 1, -1) => 'Sulfuras, Hand of Ragnaros, 1, -1'
|
||||
args: ('Sulfuras, Hand of Ragnaros', 1, 0) => 'Sulfuras, Hand of Ragnaros, 1, 0'
|
||||
args: ('Sulfuras, Hand of Ragnaros', 1, 1) => 'Sulfuras, Hand of Ragnaros, 1, 1'
|
||||
args: ('Sulfuras, Hand of Ragnaros', 1, 49) => 'Sulfuras, Hand of Ragnaros, 1, 49'
|
||||
args: ('Sulfuras, Hand of Ragnaros', 1, 50) => 'Sulfuras, Hand of Ragnaros, 1, 50'
|
||||
args: ('Sulfuras, Hand of Ragnaros', 1, 51) => 'Sulfuras, Hand of Ragnaros, 1, 51'
|
||||
args: ('Sulfuras, Hand of Ragnaros', 10, -1) => 'Sulfuras, Hand of Ragnaros, 10, -1'
|
||||
args: ('Sulfuras, Hand of Ragnaros', 10, 0) => 'Sulfuras, Hand of Ragnaros, 10, 0'
|
||||
args: ('Sulfuras, Hand of Ragnaros', 10, 1) => 'Sulfuras, Hand of Ragnaros, 10, 1'
|
||||
|
||||
@ -19,7 +19,7 @@ class GildedRoseTest(unittest.TestCase):
|
||||
"Sulfuras, Hand of Ragnaros",
|
||||
]
|
||||
input_qualities = [-1, 0, 1, 49, 50, 51]
|
||||
input_sell_ins = [0, 10, 11, 12]
|
||||
input_sell_ins = [-1, 0, 1, 10, 11, 12]
|
||||
|
||||
verify_all_combinations(
|
||||
self.do_stuff,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user