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.39 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.38 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.37 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.36 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.35 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.34 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.33 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.32 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.31 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.30 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.29 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.28 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.27 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.26 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.25 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.24 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.23 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.22 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.21 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.20 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java