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.79 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.78 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.77 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.76 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.75 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.74 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.73 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.72 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.71 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.70 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.69 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.68 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.67 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.66 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.65 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.64 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.63 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.62 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.61 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.60 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java