コード例 #1
0
        public void testGetStateAllServicesOk()
        {
            SystemState state = new SystemState(SystemState.ALL_SERVICES_OK);

            Assert.That(state.getState(), Is.EqualTo(SystemState.ALL_SERVICES_OK));
        }
コード例 #2
0
 public void testGetDescriptionForUnknownState()
 {
     Assert.That(SystemState.getDescriptionForState(42), Is.EqualTo("Unknown state"));
     Assert.That(SystemState.getDescriptionForState(-42), Is.EqualTo("Unknown state"));
 }
コード例 #3
0
 public void testGetDescriptionForCornerCases()
 {
     Assert.That(SystemState.getDescriptionForState(7), Is.EqualTo("Unknown state"));
     Assert.That(SystemState.getDescriptionForState(-1), Is.EqualTo("Unknown state"));
 }
コード例 #4
0
 public void testGetDescriptionForStateReportServiceFailure()
 {
     Assert.That(SystemState.getDescriptionForState(SystemState.REPORT_SERVICE_FAILURE), Is.EqualTo("ReportService Failure"));
 }
コード例 #5
0
 public void testGetDescriptionForStateCommunicationOk()
 {
     Assert.That(SystemState.getDescriptionForState(SystemState.COMMUNICATION_OK), Is.EqualTo("Communication OK"));
 }
コード例 #6
0
 public void testGetDescriptionForStateAllServicesOk()
 {
     Assert.That(SystemState.getDescriptionForState(SystemState.ALL_SERVICES_OK), Is.EqualTo("All Services OK"));
 }
コード例 #7
0
        public void testGetStateReportServiceFailure()
        {
            SystemState state = new SystemState(SystemState.REPORT_SERVICE_FAILURE);

            Assert.That(state.getState(), Is.EqualTo(SystemState.REPORT_SERVICE_FAILURE));
        }
コード例 #8
0
        public void testGetStateCommunicationOk()
        {
            SystemState state = new SystemState(SystemState.COMMUNICATION_OK);

            Assert.That(state.getState(), Is.EqualTo(SystemState.COMMUNICATION_OK));
        }