Browse Source

Further increase code coverage

master
BinHong Lee 7 years ago
parent
commit
d13c326cd9
3 changed files with 3 additions and 7 deletions
  1. +1
    -5
      src/main/java/libsys/Handler.java
  2. +1
    -1
      src/test/java/libsys/BookFactoryTest.java
  3. +1
    -1
      src/test/java/libsys/UserFactoryTest.java

+ 1
- 5
src/main/java/libsys/Handler.java View File

@@ -108,15 +108,11 @@ class Handler
date[2]++; date[2]++;
} }
} }
else if(date[2] == 28)
else
{ {
date[1]++; date[1]++;
date[2] = 1; date[2] = 1;
} }
else
{
date[2]++;
}
} }
else if(date[1] == 4 || date[1] == 6 || date[1] == 9 || date[1] == 11) else if(date[1] == 4 || date[1] == 6 || date[1] == 9 || date[1] == 11)
{ {


+ 1
- 1
src/test/java/libsys/BookFactoryTest.java View File

@@ -113,7 +113,7 @@ public class BookFactoryTest extends TestCase


try try
{ {
anotherBookFactory.getBook(12);
anotherBookFactory.getBook("No Such Book");
assert false; assert false;
} }
catch (Exception e) catch (Exception e)


+ 1
- 1
src/test/java/libsys/UserFactoryTest.java View File

@@ -47,9 +47,9 @@ public class UserFactoryTest extends TestCase
public void testApp() public void testApp()
{ {
newUserTest(); newUserTest();
updateTest();
fileIOTest(); fileIOTest();
exceptionTest(); exceptionTest();
updateTest();
} }


/** /**


Loading…
Cancel
Save