Ejemplo n.º 1
0
 /**
  * Test method for {@link org.igstk.validation.generator. processLog.IgstkvtProcessLogFile#
  * createSendEventFile(java.lang.String, java.lang.String)}.
  */
 @Test
 public void testCreateSendEventFileAllNull() {
   boolean caughtException = false;
   try {
     test.createSendEventFile(null, null);
   } catch (IOException e) {
     e.printStackTrace();
   } catch (NullPointerException e) {
     e.printStackTrace();
     caughtException = true;
   }
   if (!caughtException) {
     fail("Should throw some exception");
   }
 }
Ejemplo n.º 2
0
 @Test
 public void testCreateSendEventFileNoFile() {
   // test2
   boolean caughtException = false;
   try {
     test.createSendEventFile("nofile.txt", IGSTKVT_HOME + "xmlFiles/replay");
   } catch (NullPointerException e) {
     e.printStackTrace();
   } catch (IOException e) {
     e.printStackTrace();
     caughtException = true;
   }
   if (!caughtException) {
     fail("Should throw some exception");
   }
 }
Ejemplo n.º 3
0
 @Test
 public void testCreateSendEventFileHappyCase() {
   boolean caughtException = false;
   try {
     test.createSendEventFile(
         IGSTKVT_HOME + "/xmlFiles/replay/logHelloWorld.txt", IGSTKVT_HOME + "xmlFiles/replay");
   } catch (NullPointerException e) {
     e.printStackTrace();
     caughtException = true;
   } catch (IOException e) {
     e.printStackTrace();
     caughtException = true;
   }
   if (caughtException) {
     fail("Should throw some exception");
   }
   File f = new File(IGSTKVT_HOME + "/xmlFiles/replay/igstkMouseTracker_" + "02CE0FE0_test.xml");
   assertTrue(f.exists());
 }