package elekter; import static org.junit.Assert.*; import org.junit.Test; //import org.hamcrest.number.*; public class TakistiTestid { @Test public void test1() { Takisti t=new Takisti(10); assertEquals(10, t.kysiTakistus(), 0.01); t.uusPinge(5); assertEquals(5, t.kysiPinge(), 0.01); assertEquals(0.5, t.kysiVool(), 0.01); assertEquals(2.5, t.kysiVoimsus(), 0.01); // assertThat(t.kysiVoimsus(), isCloseTo(2.5, 0.01)); } }