package formatters;

import org.joda.time.DateTime;
import org.junit.Test;

import java.math.BigDecimal;

import static org.fest.assertions.Assertions.assertThat;

public class ScoreFormatterTest {

    @Test
    public void should_format_as_timer_zero() {
        String format = ScoreFormatter.formatAsTime(BigDecimal.ZERO);
        assertThat(format).isEqualTo("00:00");
    }

    @Test
    public void should_format_as_timer() {
        DateTime dateTime = new DateTime().withMinuteOfHour(15).withSecondOfMinute(56);
        BigDecimal score = BigDecimal.valueOf(dateTime.toDate().getTime());

        String format = ScoreFormatter.formatAsTime(score);
        assertThat(format).isEqualTo("15:56");
    }

}
@@ -363,10 +363,13 @@
 o(%220
-0:
+'00%5C%22
 00%22)
@@ -516,16 +516,39 @@
 nute(56)
+.withMillisOfSecond(12)
 ;%0A      
@@ -722,11 +722,15 @@
 (%2215
-:
+'
 56
+%5C%2212
 %22);%0A

Fix tests