Nur zum testen!!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
858 B

2 years ago
2 years ago
2 years ago
  1. package Arcade64.Arcade64;
  2. import static org.junit.jupiter.api.Assertions.*;
  3. import java.util.stream.Stream;
  4. import org.junit.jupiter.api.BeforeAll;
  5. import org.junit.jupiter.api.Test;
  6. import org.junit.jupiter.params.ParameterizedTest;
  7. import org.junit.jupiter.params.provider.Arguments;
  8. import org.junit.jupiter.params.provider.MethodSource;
  9. class Test_Code {
  10. @BeforeAll
  11. static void setUpBeforeClass() throws Exception {}
  12. @ParameterizedTest
  13. @MethodSource("testCaserechnen")
  14. void test(String msg, int _a, int _b, int _aspectresult ) {
  15. Code a = new Code();
  16. int resulst = a.rechne(_a, _b);
  17. assertEquals(resulst, _aspectresult, msg);
  18. }
  19. private static Stream<Arguments> testCaserechnen(){
  20. return Stream.of(
  21. Arguments.of("88", 80,8,88),
  22. Arguments.of("45", 22,23, 45),
  23. Arguments.of("96", 8,8,16)
  24. );
  25. }
  26. }