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

Version Path
trackler-2.0.5.11 tracks/java/exercises/scrabble-score/src/test/java/ScrabbleScoreTest.java
trackler-2.0.5.10 tracks/java/exercises/scrabble-score/src/test/java/ScrabbleScoreTest.java
trackler-2.0.5.9 tracks/java/exercises/scrabble-score/src/test/java/ScrabbleScoreTest.java
trackler-2.0.5.8 tracks/java/exercises/scrabble-score/src/test/java/ScrabbleScoreTest.java
trackler-2.0.5.7 tracks/java/exercises/scrabble-score/src/test/java/ScrabbleScoreTest.java
trackler-2.0.5.6 tracks/java/exercises/scrabble-score/src/test/java/ScrabbleScoreTest.java
trackler-2.0.5.5 tracks/java/exercises/scrabble-score/src/test/java/ScrabbleScoreTest.java
trackler-2.0.5.4 tracks/java/exercises/scrabble-score/src/test/java/ScrabbleScoreTest.java
trackler-2.0.5.3 tracks/java/exercises/scrabble-score/src/test/java/ScrabbleScoreTest.java
trackler-2.0.5.2 tracks/java/exercises/scrabble-score/src/test/java/ScrabbleScoreTest.java
trackler-2.0.5.1 tracks/java/exercises/scrabble-score/src/test/java/ScrabbleScoreTest.java
trackler-2.0.5.0 tracks/java/exercises/scrabble-score/src/test/java/ScrabbleScoreTest.java
trackler-2.0.4.0 tracks/java/exercises/scrabble-score/src/test/java/ScrabbleScoreTest.java
trackler-2.0.3.9 tracks/java/exercises/scrabble-score/src/test/java/ScrabbleScoreTest.java
trackler-2.0.3.8 tracks/java/exercises/scrabble-score/src/test/java/ScrabbleScoreTest.java
trackler-2.0.3.7 tracks/java/exercises/scrabble-score/src/test/java/ScrabbleScoreTest.java
trackler-2.0.3.6 tracks/java/exercises/scrabble-score/src/test/java/ScrabbleScoreTest.java
trackler-2.0.3.5 tracks/java/exercises/scrabble-score/src/test/java/ScrabbleScoreTest.java
trackler-2.0.3.4 tracks/java/exercises/scrabble-score/src/test/java/ScrabbleScoreTest.java
trackler-2.0.3.3 tracks/java/exercises/scrabble-score/src/test/java/ScrabbleScoreTest.java