Package com.jitcaforwin.trackinfoanalyzer.log.api

Examples of com.jitcaforwin.trackinfoanalyzer.log.api.LogStatus


public class LogStatusTest {

  @Test
  public void testOKStatus(){
    LogStatus ok = new Ok();
    assertTrue(ok.isOk());
    assertFalse(ok.isWarning());
    assertFalse(ok.isError());
    assertFalse(ok.isUnknown());
   
    assertEquals(LogStatus.OK, ok.toChar());
   
    assertFalse(ok.hasToBeUpdated(new Ok()));
    assertTrue(ok.hasToBeUpdated(new Warning()));
    assertTrue(ok.hasToBeUpdated(new Error()));
    assertFalse(ok.hasToBeUpdated(new Unkown()));
  }
View Full Code Here


    assertFalse(ok.hasToBeUpdated(new Unkown()));
  }
 
  @Test
  public void testWarningStatus(){
    LogStatus warning = new Warning();
    assertFalse(warning.isOk());
    assertTrue(warning.isWarning());
    assertFalse(warning.isUnknown());
   
    assertEquals(LogStatus.WARNING, warning.toChar());
   
    assertFalse(warning.hasToBeUpdated(new Ok()));
    assertFalse(warning.hasToBeUpdated(new Warning()));
    assertTrue(warning.hasToBeUpdated(new Error()));
    assertFalse(warning.hasToBeUpdated(new Unkown()));
  }
View Full Code Here

    assertFalse(warning.hasToBeUpdated(new Unkown()));
  }
 
  @Test
  public void testErrorStatus(){
    LogStatus error = new Error();
    assertFalse(error.isOk());
    assertFalse(error.isWarning());
    assertTrue(error.isError());
    assertFalse(error.isUnknown());
   
    assertEquals(LogStatus.ERROR, error.toChar());
   
    assertFalse(error.hasToBeUpdated(new Ok()));
    assertFalse(error.hasToBeUpdated(new Warning()));
    assertFalse(error.hasToBeUpdated(new Error()));
    assertFalse(error.hasToBeUpdated(new Unkown()));
  }
View Full Code Here

    assertFalse(error.hasToBeUpdated(new Unkown()));
  }
 
  @Test
  public void testUnkownStatus(){
    LogStatus status = new Unkown();
    assertFalse(status.isOk());
    assertFalse(status.isWarning());
    assertFalse(status.isError());
    assertTrue(status.isUnknown());
   
    assertEquals(LogStatus.UNKOWN, status.toChar());
   
    assertTrue(status.hasToBeUpdated(new Ok()));
    assertTrue(status.hasToBeUpdated(new Warning()));
    assertTrue(status.hasToBeUpdated(new Error()));
    assertFalse(status.hasToBeUpdated(new Unkown()));
  }
View Full Code Here

TOP

Related Classes of com.jitcaforwin.trackinfoanalyzer.log.api.LogStatus

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.