|
@ -0,0 +1,41 @@ |
|
|
|
|
|
package Arcade64.Arcade64; |
|
|
|
|
|
|
|
|
|
|
|
import static org.junit.jupiter.api.Assertions.*; |
|
|
|
|
|
|
|
|
|
|
|
import java.util.stream.Stream; |
|
|
|
|
|
|
|
|
|
|
|
import org.junit.jupiter.api.BeforeAll; |
|
|
|
|
|
import org.junit.jupiter.api.Test; |
|
|
|
|
|
import org.junit.jupiter.params.ParameterizedTest; |
|
|
|
|
|
import org.junit.jupiter.params.provider.Arguments; |
|
|
|
|
|
import org.junit.jupiter.params.provider.MethodSource; |
|
|
|
|
|
|
|
|
|
|
|
class Test_Code { |
|
|
|
|
|
|
|
|
|
|
|
@BeforeAll |
|
|
|
|
|
static void setUpBeforeClass() throws Exception {} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ParameterizedTest |
|
|
|
|
|
@MethodSource("testCaserechnen") |
|
|
|
|
|
void test(String msg, int _a, int _b, int _aspectresult ) { |
|
|
|
|
|
Code a = new Code(); |
|
|
|
|
|
|
|
|
|
|
|
int resulst = a.rechne(_a, _b); |
|
|
|
|
|
|
|
|
|
|
|
assertEquals(resulst, _aspectresult, msg); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static Stream<Arguments> testCaserechnen(){ |
|
|
|
|
|
return Stream.of( |
|
|
|
|
|
Arguments.of("88", 80,8,88), |
|
|
|
|
|
Arguments.of("45", 22,23, 45), |
|
|
|
|
|
Arguments.of("96", 8,8,88) |
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |