Skip to content

Instantly share code, notes, and snippets.

View datenreisender's full-sized avatar
🏳️‍🌈

Marko Schulz datenreisender

🏳️‍🌈
View GitHub Profile
@datenreisender
datenreisender / RomanNumbersTest.java
Created August 9, 2011 14:22 — forked from sanitz/RomanNumbersTest.java
Result of the roman numbers kata in Java
import static org.junit.Assert.*;
public class RomanNumbersTest {
enum Roman {
C(100), XC(90), L(50), XL(40), X(10), IX(9), V(5), IV(4), I(1);
final int decimal;
Roman(int decimal) { this.decimal = decimal; }
static String of(int n) {
assertThat(afterScoring(3), scoreIsIncreasedBy(3));
assertThat(afterTeamAScores2(), scoreIs(0,2));
assertThat(after(Team.A).Scored(2), scoreIs(0,2));
assertThat(scorekeeper.countFor(Team.A).points(2), thenScoreIs(0,2));
assertThat(scorekeeper.countFor(Team.A, 2), thenScoreIs(0,2));
assertThat(scorekeeper.countFor(board.selectedTeam(), board.selectedPoints()), thenScoreIs(0,2));