示例#1
0
 @Test
 public void addClient() throws NumberFormatException, InvalidInputException {
   Client c6 =
       new Client(
           "Jon",
           "B",
           infocentre,
           "*****@*****.**",
           " 187 Wilcock St",
           new Long("543253825325432"),
           "2021-05-01");
   a1.addClient(c6);
   assertTrue(infocentre.getClients().contains(c6));
 }
示例#2
0
 @Test
 public void testEditClientInfoException() {
   // c1.setEmail("*****@*****.**");
   Throwable t = null;
   try {
     a1.editClientInfo(
         new Client(
             "Jasdes",
             "D",
             infocentre,
             "*****@*****.**",
             "123 Elm St",
             new Long("5427633254325432"),
             "2019-11-23"),
         "email",
         "*****@*****.**");
   } catch (NumberFormatException e) {
     // TODO Auto-generated catch block
     t = e;
     assertNotNull(t);
     assertSame(InvalidInputException.class, t.getClass());
   }
 }
示例#3
0
 @Test
 public void testingEditClientInfoInt() {
   a1.editClientInfo(c3, "creditcardno", 246455554);
   assertEquals(246455554, c3.getCreditCardNumber());
 }
示例#4
0
 @Test
 public void testRemoveFlight() {
   a1.removeFlight(f1);
   assertFalse(infocentre.getFlights().containsValue(f1));
 }
示例#5
0
 @Test
 public void testConstructor() throws NumberFormatException, InvalidInputException {
   Admin a20 = new Admin("D", "B", a1.getInfoCentre(), "*****@*****.**");
   assertTrue(infocentre.getAdmins().contains(a20));
 }
示例#6
0
 @Test
 public void testEditClientInfo() {
   // c1.setEmail("*****@*****.**");
   a1.editClientInfo(c1, "email", "*****@*****.**");
   assertEquals("*****@*****.**", c1.getEmail());
 }