Sha256: 6b9269c6d0e7a9585ac2fb25d1b430c317e52978b523f96a4d27a5e9a3908b75

Contents?: true

Size: 1.09 KB

Versions: 89

Compression:

Stored size: 1.09 KB

Contents

import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;

import static org.junit.Assert.assertEquals;

public class TwoferTest {

    private Twofer twofer;

    @Before
    public void setup() {
        twofer = new Twofer();
    }

    @Test
    public void noNameGiven() {
        String input = null;
        String expected = "One for you, one for me.";

        assertEquals(expected, twofer.twofer(input));
    }

    @Ignore("Remove to run test")
    @Test
    public void aNameGiven() {
        String input = "Alice";
        String expected = "One for Alice, one for me.";

        assertEquals(expected, twofer.twofer(input));
    }

    @Ignore("Remove to run test")
    @Test
    public void anotherNameGiven() {
        String input = "Bob";
        String expected = "One for Bob, one for me.";

        assertEquals(expected, twofer.twofer(input));
    }

    @Ignore("Remove to run test")
    @Test
    public void emptyStringGiven() {
        String input = "";
        String expected = "One for , one for me.";

        assertEquals(expected, twofer.twofer(input) );
    }
}

Version data entries

89 entries across 89 versions & 1 rubygems

Version Path
trackler-2.2.1.99 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.98 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.97 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.96 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.95 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.94 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.93 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.92 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.91 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.90 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.89 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.88 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.87 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.86 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.85 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.84 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.83 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.82 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.81 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.80 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java