Exemplo n.º 1
0
 @Test
 public void test06789Run() {
   Digital ourDigital = new Digital();
   assertEquals(
       6789,
       ourDigital.convertSeriesToInteger(" _  _  _  _  _ ", "| ||_   ||_||_|", "|_||_|  ||_|  |"));
 }
Exemplo n.º 2
0
 @Test
 public void test3and4and5() {
   Digital ourDigital = new Digital();
   assertEquals(3, ourDigital.convertToDigit(" _ ", " _|", " _|"));
   assertEquals(4, ourDigital.convertToDigit("   ", "|_|", "  |"));
   assertEquals(5, ourDigital.convertToDigit(" _ ", "|_ ", " _|"));
 }
Exemplo n.º 3
0
 @Test
 public void testSeriesOfNums() {
   Digital ourDigital = new Digital();
   assertEquals(
       543210,
       ourDigital.convertSeriesToInteger(
           " _     _  _     _ ", "|_ |_| _| _| | | |", " _|  | _||_  | |_|"));
 }
Exemplo n.º 4
0
 @Test
 public void testSingleNumber() {
   Digital ourDigital = new Digital();
   assertEquals(8, ourDigital.convertSeriesToInteger(" _ ", "|_|", "|_|"));
 }
Exemplo n.º 5
0
 @Test(expected = IllegalArgumentException.class)
 public void testGarbageDay() {
   Digital ourDigital = new Digital();
   ourDigital.convertToDigit("League", "of", "Legends");
 }
Exemplo n.º 6
0
 @Test
 public void test8and9() {
   Digital ourDigital = new Digital();
   assertEquals(8, ourDigital.convertToDigit(" _ ", "|_|", "|_|"));
   assertEquals(9, ourDigital.convertToDigit(" _ ", "|_|", "  |"));
 }
Exemplo n.º 7
0
 @Test
 public void test6and7() {
   Digital ourDigital = new Digital();
   assertEquals(6, ourDigital.convertToDigit(" _ ", "|_ ", "|_|"));
   assertEquals(7, ourDigital.convertToDigit(" _ ", "  |", "  |"));
 }
Exemplo n.º 8
0
 @Test
 public void testTwo() {
   Digital ourDigital = new Digital();
   assertEquals(2, ourDigital.convertToDigit(" _ ", " _|", "|_ "));
 }
Exemplo n.º 9
0
 @Test
 public void testOne() {
   Digital ourDigital = new Digital();
   assertEquals(1, ourDigital.convertToDigit("   ", " | ", " | "));
 }
Exemplo n.º 10
0
 @Test
 public void testZero() {
   Digital ourDigital = new Digital();
   assertEquals(0, ourDigital.convertToDigit(" _ ", "| |", "|_|"));
 }