Sha256: 2983b08742b2e550dea62745809cdfb7a94d129269d3e9e50c4f457ab1d4155a

Contents?: true

Size: 1.2 KB

Versions: 72

Compression:

Stored size: 1.2 KB

Contents

import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;

import java.util.Arrays;
import java.util.Collection;

import static org.junit.Assert.assertEquals;

/*
 * version: 1.0.0
 */
@RunWith(Parameterized.class)
public class ScrabbleScoreTest {

    private String scrabbleInput;
    private int scrabbleScore;

    @Parameterized.Parameters(name = "{index}: expected scrabble score for \"{0}\" to be {1}")
    public static Collection<Object[]> data() {
        return Arrays.asList(new Object[][]{
                {"a", 1},
                {"A", 1},
                {"f", 4},
                {"at", 2},
                {"zoo", 12},
                {"street", 6},
                {"quirky", 22},
                {"OxyphenButazone", 41},
                {"pinata", 8},
                {"", 0},
                {"abcdefghijklmnopqrstuvwxyz", 87},
        });
    }

    public ScrabbleScoreTest(String scrabbleInput, int scrabbleScore) {
        this.scrabbleInput = scrabbleInput;
        this.scrabbleScore = scrabbleScore;
    }

    @Test
    public void test() {
        Scrabble scrabble = new Scrabble(scrabbleInput);
        assertEquals(scrabbleScore, scrabble.getScore());
    }

}

Version data entries

72 entries across 72 versions & 1 rubygems

Version Path
trackler-2.2.1.45 tracks/java/exercises/scrabble-score/src/test/java/ScrabbleScoreTest.java
trackler-2.2.1.44 tracks/java/exercises/scrabble-score/src/test/java/ScrabbleScoreTest.java
trackler-2.2.1.43 tracks/java/exercises/scrabble-score/src/test/java/ScrabbleScoreTest.java
trackler-2.2.1.42 tracks/java/exercises/scrabble-score/src/test/java/ScrabbleScoreTest.java
trackler-2.2.1.41 tracks/java/exercises/scrabble-score/src/test/java/ScrabbleScoreTest.java
trackler-2.2.1.40 tracks/java/exercises/scrabble-score/src/test/java/ScrabbleScoreTest.java
trackler-2.2.1.39 tracks/java/exercises/scrabble-score/src/test/java/ScrabbleScoreTest.java
trackler-2.2.1.38 tracks/java/exercises/scrabble-score/src/test/java/ScrabbleScoreTest.java
trackler-2.2.1.37 tracks/java/exercises/scrabble-score/src/test/java/ScrabbleScoreTest.java
trackler-2.2.1.36 tracks/java/exercises/scrabble-score/src/test/java/ScrabbleScoreTest.java
trackler-2.2.1.35 tracks/java/exercises/scrabble-score/src/test/java/ScrabbleScoreTest.java
trackler-2.2.1.34 tracks/java/exercises/scrabble-score/src/test/java/ScrabbleScoreTest.java
trackler-2.2.1.33 tracks/java/exercises/scrabble-score/src/test/java/ScrabbleScoreTest.java
trackler-2.2.1.32 tracks/java/exercises/scrabble-score/src/test/java/ScrabbleScoreTest.java
trackler-2.2.1.31 tracks/java/exercises/scrabble-score/src/test/java/ScrabbleScoreTest.java
trackler-2.2.1.30 tracks/java/exercises/scrabble-score/src/test/java/ScrabbleScoreTest.java
trackler-2.2.1.29 tracks/java/exercises/scrabble-score/src/test/java/ScrabbleScoreTest.java
trackler-2.2.1.28 tracks/java/exercises/scrabble-score/src/test/java/ScrabbleScoreTest.java
trackler-2.2.1.27 tracks/java/exercises/scrabble-score/src/test/java/ScrabbleScoreTest.java
trackler-2.2.1.26 tracks/java/exercises/scrabble-score/src/test/java/ScrabbleScoreTest.java