import static org.junit.Assert.*;

import java.util.ArrayList;

import org.junit.Test;

public class GildedRoseTest {

	private static final int QUALITY_DECAY = 1;
	private static final int ANY_QUALITY = 40;
	private static final int ANY_SELLIN = 14;

	@Test
	public void qualityShouldDecay() {

		Item product = new Item("ANY_NAME", ANY_SELLIN, ANY_QUALITY);
		GildedRose.items = new ArrayList<Item>();
		GildedRose.items.add(product);

		GildedRose.updateQuality();

		assertEquals("Quality should have decay", ANY_QUALITY - QUALITY_DECAY, product.quality);
	}
}

@@ -57,16 +57,41 @@
 yList;%0A%0A
+import org.junit.Before;%0A
 import o
@@ -137,16 +137,18 @@
 Test %7B%0A%0A
+%09%0A
 %09private
@@ -165,23 +165,24 @@
 nal int 
-QUALITY
+STANDARD
 _DECAY =
@@ -185,16 +185,78 @@
 AY = 1;%0A
+%09private static final int EXPIRED_DECAY = 2*STANDARD_DECAY;%0A%09%0A
 %09private
@@ -338,191 +338,515 @@
 14;%0A
+%09
 %0A%09
-@Test%0A%09public void qualityShouldDecay() %7B%0A%0A%09%09Item product = new Item(%22ANY_NAME%22, ANY_SELLIN, ANY_QUALITY);%0A%09%09GildedRose.items = new ArrayList%3CItem%3E();%0A%09%09GildedRose.items.add(product
+private static final int EXPIRED_SELLIN = 0;%0A%0A%09Item product;%0A%0A%09@Before%0A%09public void setUp() %7B%0A%0A%09%09GildedRose.items = new ArrayList%3CItem%3E();%0A%09%09product = new Item(%22ANY_NAME%22, ANY_SELLIN, ANY_QUALITY);%0A%09%09GildedRose.items.add(product);%0A%0A%09%7D%0A%0A%09@Test%0A%09public void qualityShouldDecay() %7B%0A%0A%09%09GildedRose.updateQuality();%0A%0A%09%09assertEquals(%22Quality should have decay%22, ANY_QUALITY - STANDARD_DECAY,%0A%09%09%09%09product.getQuality());%0A%09%7D%0A%0A%09@Test%0A%09public void qualityDecayFasterWhenExpired() %7B%0A%09%09product.setSellIn(EXPIRED_SELLIN
 );%0A%0A
@@ -903,37 +903,44 @@
 lity should 
-have
  decay
-%22, 
+ faster%22,%0A%09%09%09%09
 ANY_QUALITY 
@@ -945,21 +945,23 @@
 Y - 
-QUALITY
+EXPIRED
 _DECAY
+  
 , pr
@@ -970,19 +970,26 @@
 uct.
-q
+getQ
 uality
+()
 );%0A
+%0A
 %09%7D%0A
+%0A
 %7D%0A

add expired product test