Add tests for the LCMServer

This commit is contained in:
Manuel Thalmann 2022-09-27 12:57:16 +02:00
parent d13598d9c0
commit 9d200788d0

View 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");
}
}