edu.udayton.udri.asset.novatel/test/edu/udayton/udri/asset/novatel/TestNovatelStatusService.java
@Test
    public void testGetStatusStatusUnknown()
    {
        List<SummaryStatusEnum> statuses = Arrays.asList(SummaryStatusEnum.GOOD, SummaryStatusEnum.UNKNOWN);
        List<ComponentStatus> list = getMockComponentStatuses(m_ComponentTypes, m_Descriptors, statuses);
        Status status = getLastStatus(list);
        
        assertThat(status, notNullValue());
        assertThat(status.getSummaryStatus().getSummary(), is(SummaryStatusEnum.UNKNOWN));
        assertThat(status.getSummaryStatus().getDescription(), is("Not all components have a known status."));
       
        List<ComponentStatus> compStatuses = status.getComponentStatuses();
        verifyStatuses(compStatuses, list);
    }
/**
     * Verify that if any component status is unknown then overall status is unknown.
     */
Verify that if any component status is unknown then overall status is unknown.
Verify that if any component status is unknown then overall status is unknown .
@Test
    public void testGetStatusStatusUnknown()
    {
        List<SummaryStatusEnum> statuses = Arrays.asList(SummaryStatusEnum.GOOD, SummaryStatusEnum.UNKNOWN);
        List<ComponentStatus> list = getMockComponentStatuses(m_ComponentTypes, m_Descriptors, statuses);
        Status status = getLastStatus(list);
        assertThat(status, notNullValue());
        assertThat(status.getSummaryStatus().getSummary(), is(SummaryStatusEnum.UNKNOWN));
        assertThat(status.getSummaryStatus().getDescription(), is("Not all components have a known status."));
        List<ComponentStatus> compStatuses = status.getComponentStatuses();
        verifyStatuses(compStatuses, list);
    }
@ Test public void testGetStatusStatusUnknown ( ) { List < SummaryStatusEnum > statuses = Arrays . asList ( SummaryStatusEnum . GOOD , SummaryStatusEnum . UNKNOWN ) ; List < ComponentStatus > list = getMockComponentStatuses ( m_ComponentTypes , m_Descriptors , statuses ) ; Status status = getLastStatus ( list ) ; assertThat ( status , notNullValue ( ) ) ; assertThat ( status . getSummaryStatus ( ) . getSummary ( ) , is ( SummaryStatusEnum . UNKNOWN ) ) ; assertThat ( status . getSummaryStatus ( ) . getDescription ( ) , is ( "Not all components have a known status." ) ) ; List < ComponentStatus > compStatuses = status . getComponentStatuses ( ) ; verifyStatuses ( compStatuses , list ) ; }
Verify that if any component status is unknown then overall status is unknown.
Verify that if any component status is unknown then overall status is unknown .