package esimene; import static org.junit.Assert.*; import org.junit.Before; import org.junit.Test; public class KalkulaatorTest { Kalkulaator k; @Before public void setUp(){ k=new Kalkulaator(); } @Test public void testEmpty() { assertEquals(0, k.arvuta("")); } @Test public void testOneNumber(){ assertEquals(1, k.arvuta("1")); assertEquals(5, k.arvuta("5")); } @Test public void testLongNumber(){ assertEquals(12345, k.arvuta("12345")); assertEquals(-25, k.arvuta("-25")); } @Test public void testCommaSeparatedQueue(){ assertEquals(7, k.arvuta("3, 4")); } }