mil.dod.th.ose.controller/test/mil/dod/th/ose/controller/impl/TestTerraHarvestControllerImpl.java
@Test
    public final void testSetAll() throws Exception
    {
        // Set name
        m_SUT.setName("Blah");
        m_SUT.setId(0xabcdefab);
        m_SUT.setOperationMode(OperationMode.OPERATIONAL_MODE);
        
        ArgumentCaptor<File> fileCaptor = ArgumentCaptor.forClass(File.class);
        verify(m_FileService, atLeastOnce()).createFileOutputStream(fileCaptor.capture());
        assertThat(fileCaptor.getValue().getPath(), is(EXPECTED_TH_SYSTEM_PROPERTIES_FILENAME));
        assertThat(new String(m_OutputData.toByteArray()), containsString("name=Blah"));
        assertThat(new String(m_OutputData.toByteArray()), containsString("id=0xabcdefab"));
        assertThat(new String(m_OutputData.toByteArray()), containsString("operation.mode=operational"));
    }
/**
     * Verify all properties end up in the file when written to.
     */
Verify all properties end up in the file when written to.
Verify all properties end up in the file when written to .
@Test
    public final void testSetAll() throws Exception
    {
        m_SUT.setName("Blah");
        m_SUT.setId(0xabcdefab);
        m_SUT.setOperationMode(OperationMode.OPERATIONAL_MODE);
        ArgumentCaptor<File> fileCaptor = ArgumentCaptor.forClass(File.class);
        verify(m_FileService, atLeastOnce()).createFileOutputStream(fileCaptor.capture());
        assertThat(fileCaptor.getValue().getPath(), is(EXPECTED_TH_SYSTEM_PROPERTIES_FILENAME));
        assertThat(new String(m_OutputData.toByteArray()), containsString("name=Blah"));
        assertThat(new String(m_OutputData.toByteArray()), containsString("id=0xabcdefab"));
        assertThat(new String(m_OutputData.toByteArray()), containsString("operation.mode=operational"));
    }
@ Test public final void testSetAll ( ) throws Exception { m_SUT . setName ( "Blah" ) ; m_SUT . setId ( 0xabcdefab ) ; m_SUT . setOperationMode ( OperationMode . OPERATIONAL_MODE ) ; ArgumentCaptor < File > fileCaptor = ArgumentCaptor . forClass ( File . class ) ; verify ( m_FileService , atLeastOnce ( ) ) . createFileOutputStream ( fileCaptor . capture ( ) ) ; assertThat ( fileCaptor . getValue ( ) . getPath ( ) , is ( EXPECTED_TH_SYSTEM_PROPERTIES_FILENAME ) ) ; assertThat ( new String ( m_OutputData . toByteArray ( ) ) , containsString ( "name=Blah" ) ) ; assertThat ( new String ( m_OutputData . toByteArray ( ) ) , containsString ( "id=0xabcdefab" ) ) ; assertThat ( new String ( m_OutputData . toByteArray ( ) ) , containsString ( "operation.mode=operational" ) ) ; }
Verify all properties end up in the file when written to.
Verify all properties end up in the file when written to .
// Set name