Entry { protected static int parseNumber(String line0, String line1, String line2) { if (line0.charAt(1) == ' ') { if (line1.charAt(0) == ' ') { return 1; } else { return 4; } } else { if (line1.charAt(0) == ' ') { if (line1.charAt(1) == ' ') { return 7; } else { if (line2.charAt(0) == ' ') { return 3; } else { return 2; } } } else { if (line1.charAt(2) == ' ') { if (line2.charAt(0) == ' ') { return 5; } else { return 6; } } else { if (line2.charAt(0) == ' ') { return 9; } else { if (line1.charAt(1) == ' ') { return 0; } else { return 8; } } } } } } Entry(List<Integer> accountNumber); Account toAccount();  }
@Test public void should_parse_the_number_zero() { int parsedInput = Entry.parseNumber( " _ ", "| |", "|_|"); assertThat(parsedInput).isEqualTo(0); }
@Test public void should_parse_the_number_one() { int parsedInput = Entry.parseNumber( " ", " |", " |"); assertThat(parsedInput).isEqualTo(1); }
@Test public void should_parse_the_number_two() { int parsedInput = Entry.parseNumber( " _ ", " _|", "|_ "); assertThat(parsedInput).isEqualTo(2); }
@Test public void should_parse_the_number_three() { int parsedInput = Entry.parseNumber( " _ ", " _|", " _|"); assertThat(parsedInput).isEqualTo(3); }
@Test public void should_parse_the_number_four() { int parsedInput = Entry.parseNumber( " ", "|_|", " |"); assertThat(parsedInput).isEqualTo(4); }
@Test public void should_parse_the_number_five() { int parsedInput = Entry.parseNumber( " _ ", "|_ ", " _|"); assertThat(parsedInput).isEqualTo(5); }
@Test public void should_parse_the_number_six() { int parsedInput = Entry.parseNumber( " _ ", "|_ ", "|_|"); assertThat(parsedInput).isEqualTo(6); }
@Test public void should_parse_the_number_seven() { int parsedInput = Entry.parseNumber( " _ ", " |", " |"); assertThat(parsedInput).isEqualTo(7); }
@Test public void should_parse_the_number_eight() { int parsedInput = Entry.parseNumber( " _ ", "|_|", "|_|"); assertThat(parsedInput).isEqualTo(8); }
@Test public void should_parse_the_number_nine() { int parsedInput = Entry.parseNumber( " _ ", "|_|", " _|"); assertThat(parsedInput).isEqualTo(9); }