package day01.vendingmachine;

/**
 * Created by bollsal on 2016. 11. 10..
 */
public class VendingMachineTest {
}

@@ -28,88 +28,1646 @@
 e;%0A%0A
-/**%0A * Created by bollsal on 2016. 11. 10..%0A */%0Apublic class VendingMachineTest %7B
+import day01.quiz.vendingmachine.Cola;%0Aimport day01.quiz.vendingmachine.Juice;%0Aimport day01.quiz.vendingmachine.VendingMachine;%0Aimport org.hamcrest.CoreMatchers;%0Aimport org.junit.*;%0Aimport util.Logger;%0A%0Aimport static org.hamcrest.CoreMatchers.is;%0Aimport static org.hamcrest.MatcherAssert.assertThat;%0A%0A/**%0A * Created by bollsal on 2016. 11. 10..%0A */%0Apublic class VendingMachineTest %7B%0A    private static Logger logger;%0A%0A    private VendingMachine vendingMachine;%0A    private Cola cola;%0A    private Juice juice;%0A%0A    @BeforeClass%0A    public static void beforeClass() %7B%0A        logger = new Logger();%0A    %7D%0A%0A    @Before%0A    public void setUp() %7B%0A        vendingMachine = new VendingMachine();%0A        cola = vendingMachine.getMenu().getCola();%0A        juice = vendingMachine.getMenu().getJuice();%0A    %7D%0A%0A    @Test%0A    public void %ED%85%8C%EC%8A%A4%ED%8A%B8_1() %7B%0A        int insertMoney = 10000;%0A        vendingMachine.insertMoney(insertMoney);%0A%0A        assertThat(vendingMachine.getInsertMoney(), is(insertMoney));%0A    %7D%0A%0A    @Test%0A    public void %ED%85%8C%EC%8A%A4%ED%8A%B8_2() %7B%0A        assertThat(vendingMachine.getMenu().hasItem(), is(true));%0A    %7D%0A%0A    @Test%0A    public void %ED%85%8C%EC%8A%A4%ED%8A%B8_3() %7B%0A%0A        assertThat(vendingMachine.getMenu().hasCola(), is(true));%0A        assertThat(vendingMachine.getMenu().hasJuice(), is(true));%0A    %7D%0A%0A    @Test%0A    public void %ED%85%8C%EC%8A%A4%ED%8A%B8_4() %7B%0A        int insertMoney = 90;%0A        vendingMachine.insertMoney(insertMoney);%0A        assertThat(vendingMachine.buyDrink(cola.getMenuName()), is(true));%0A    %7D%0A%0A    @After%0A    public void tearDown() %7B%0A        vendingMachine = null;%0A    %7D%0A%0A    @AfterClass%0A    public static void afterClass() %7B%0A        logger = null;%0A    %7D
 %0A%7D%0A

test code