Add tests for the LCMServer
This commit is contained in:
parent
d13598d9c0
commit
9d200788d0
23
app/src/test/java/ch/nuth/zhaw/exbox/ADS1_1_test.java
Normal file
23
app/src/test/java/ch/nuth/zhaw/exbox/ADS1_1_test.java
Normal file
|
@ -0,0 +1,23 @@
|
|||
package ch.nuth.zhaw.exbox;
|
||||
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
public class ADS1_1_test {
|
||||
LCMServer server;
|
||||
|
||||
@BeforeEach
|
||||
public void setUp() {
|
||||
server = new LCMServer();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testKgv() {
|
||||
assertEquals(12, server.leastCommonMultiple(3, 4), "kgv von 3 4");
|
||||
assertEquals(4, server.leastCommonMultiple(2, 4), "kgv von 2 4");
|
||||
assertEquals(35, server.leastCommonMultiple(5, 7), "kgv von 5 7");
|
||||
assertEquals(12, server.leastCommonMultiple(4, 6), "kgv von 4 6");
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue