New Fetch

This commit is contained in:
2017-08-12 09:01:07 -05:00
parent ba838ca4fb
commit a9630f6ee8
58 changed files with 2530 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
public class Twofer {
public String twofer(String name) {
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
}
}

View File

@@ -0,0 +1,41 @@
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));
}
}