edu.udayton.udri.asset.novatel/test/edu/udayton/udri/asset/novatel/TestNovatelStatusService.java
@Test
    public void testGetStatusDegraded()
    {
        List<SummaryStatusEnum> statuses = Arrays.asList(SummaryStatusEnum.DEGRADED, SummaryStatusEnum.GOOD);
        List<ComponentStatus> list = getMockComponentStatuses(m_ComponentTypes, m_Descriptors, statuses);
        Status status = getLastStatus(list);
        
        assertThat(status, notNullValue());
        assertThat(status.getSummaryStatus().getSummary(), is(SummaryStatusEnum.DEGRADED));
        assertThat(status.getSummaryStatus().getDescription(), 
                is("Not all supporting components are functioning as expected."));
       
        List<ComponentStatus> compStatuses = status.getComponentStatuses();
        verifyStatuses(compStatuses, list);
    }
/**
     * Verify that if one status is degraded and one is good then status should be degraded.
     */
Verify that if one status is degraded and one is good then status should be degraded.
Verify that if one status is degraded and one is good then status should be degraded .
@Test
    public void testGetStatusDegraded()
    {
        List<SummaryStatusEnum> statuses = Arrays.asList(SummaryStatusEnum.DEGRADED, SummaryStatusEnum.GOOD);
        List<ComponentStatus> list = getMockComponentStatuses(m_ComponentTypes, m_Descriptors, statuses);
        Status status = getLastStatus(list);
        assertThat(status, notNullValue());
        assertThat(status.getSummaryStatus().getSummary(), is(SummaryStatusEnum.DEGRADED));
        assertThat(status.getSummaryStatus().getDescription(), 
                is("Not all supporting components are functioning as expected."));
        List<ComponentStatus> compStatuses = status.getComponentStatuses();
        verifyStatuses(compStatuses, list);
    }
@ Test public void testGetStatusDegraded ( ) { List < SummaryStatusEnum > statuses = Arrays . asList ( SummaryStatusEnum . DEGRADED , SummaryStatusEnum . GOOD ) ; List < ComponentStatus > list = getMockComponentStatuses ( m_ComponentTypes , m_Descriptors , statuses ) ; Status status = getLastStatus ( list ) ; assertThat ( status , notNullValue ( ) ) ; assertThat ( status . getSummaryStatus ( ) . getSummary ( ) , is ( SummaryStatusEnum . DEGRADED ) ) ; assertThat ( status . getSummaryStatus ( ) . getDescription ( ) , is ( "Not all supporting components are functioning as expected." ) ) ; List < ComponentStatus > compStatuses = status . getComponentStatuses ( ) ; verifyStatuses ( compStatuses , list ) ; }
Verify that if one status is degraded and one is good then status should be degraded.
Verify that if one status is degraded and one is good then status should be degraded .