Sha256: ed17ebc3ef0636764f76d78bc7779318e210bb2d3dc3baaf660a5b47b1fd8a87
Contents?: true
Size: 1.03 KB
Versions: 48
Compression:
Stored size: 1.03 KB
Contents
import org.junit.Test; import org.junit.Ignore; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; import java.util.Arrays; import java.util.Collection; import static org.junit.Assert.assertEquals; @RunWith(Parameterized.class) public class ScrabbleScoreTest { private String input; private int expectedOutput; @Parameterized.Parameters public static Collection<Object[]> data() { return Arrays.asList(new Object[][]{ {"", 0}, {" \t\n", 0}, {null, 0}, {"a", 1}, {"f", 4}, {"street", 6}, {"quirky", 22}, {"OXYPHENBUTAZONE", 41}, {"alacrity", 13}, }); } public ScrabbleScoreTest(String input, int expectedOutput) { this.input = input; this.expectedOutput = expectedOutput; } @Test public void test() { Scrabble scrabble = new Scrabble(input); assertEquals(expectedOutput, scrabble.getScore()); } }
Version data entries
48 entries across 48 versions & 1 rubygems