package com.matao;

/**
 * Created by matao on 2019-01-06.
 */
public class Q30_StackWithMinTest {
}

@@ -17,85 +17,711 @@
 o;%0A%0A
-/**%0A * Created by matao on 2019-01-06.%0A */%0Apublic class Q30_StackWithMinTest %7B
+import org.junit.jupiter.api.Assertions;%0Aimport org.junit.jupiter.api.BeforeEach;%0Aimport org.junit.jupiter.api.Test;%0A%0Aimport java.util.EmptyStackException;%0A%0A/**%0A * Created by matao on 2019-01-06.%0A */%0Apublic class Q30_StackWithMinTest %7B%0A%0A    private Q30_StackWithMin%3CInteger%3E stackWithMin;%0A%0A    @BeforeEach%0A    void setUp() %7B%0A        stackWithMin = new Q30_StackWithMin%3C%3E();%0A    %7D%0A%0A    @Test%0A    void testEmptyStack() %7B%0A        Assertions.assertThrows(EmptyStackException.class, () -%3E stackWithMin.min());%0A    %7D%0A%0A    @Test%0A    void test() %7B%0A        stackWithMin.push(1);%0A        stackWithMin.push(3);%0A        stackWithMin.push(-1);%0A        Assertions.assertEquals(-1, stackWithMin.min().intValue());%0A    %7D
 %0A%7D%0A

add test cases for StackWithMin