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.59 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.58 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.57 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.56 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.55 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.54 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.53 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.52 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.51 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.50 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.49 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.48 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.47 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.46 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.45 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.44 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.43 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.42 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.41 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java
trackler-2.2.1.40 tracks/java/exercises/two-fer/src/test/java/TwoferTest.java