Skip to content

Commit

Permalink
fail: add correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
moss committed Apr 4, 2013
1 parent 05320b0 commit 251b394
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions test/net/m14m/romannumeralkata/AdditionTest.java
@@ -0,0 +1,24 @@
package net.m14m.romannumeralkata;

import org.junit.*;

import static org.junit.Assert.assertEquals;

public class AdditionTest {
@Test public void shouldAddUpNumbersCorrectly() {
Addition addition = new Addition(arabicConstant(1), arabicConstant(3));
assertEquals(4, addition.getValue());
}

private Expression arabicConstant(final int value) {
return new Expression() {
public int getValue() {
return value;
}

public Formatter getFormatter() {
return new ArabicNumeralFormatter();
}
};
}
}

0 comments on commit 251b394

Please sign in to comment.