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.
20 lines
699 B
20 lines
699 B
package de.edu.hsfulda.ccip.tdd.purefunction.parameterized;
|
|
|
|
import static org.junit.Assert.assertThat;
|
|
|
|
import org.hamcrest.CoreMatchers;
|
|
import org.junit.jupiter.params.ParameterizedTest;
|
|
import org.junit.jupiter.params.provider.CsvFileSource;
|
|
|
|
import de.edu.hsfulda.ccip.tdd.purefunction.BowlingCalculator;
|
|
|
|
public class BowlingCalculatorParameterized_3_CsvFileTest {
|
|
|
|
@ParameterizedTest(name = "#{index} - game type {0}")
|
|
@CsvFileSource(resources = "/gameSamples.csv",numLinesToSkip = 1)
|
|
void testStreamSouceMulti(String gameType, String rolls, int expectedResult) {
|
|
int score = new BowlingCalculator().score(rolls);
|
|
assertThat(rolls, score, CoreMatchers.equalTo(expectedResult));
|
|
}
|
|
|
|
}
|