src/test/java/seedu/address/ui/AutocompleterTest.java
private void assertAutocompleteSuccess(String commandBoxText, String expectedResult, String expectedMessage,
                   String expectedCommand, String expectedState) throws DataConversionException, IOException {
        TestLogger testLogger = new TestLogger(autocompleter.getClass(), Level.INFO);
        autocompleter.updateAutocompleter(commandBoxText);
        String autocompleteResult = autocompleter.autocomplete();
        assertEquals(expectedResult, autocompleteResult);
        guiRobot.pauseForEvent();
        assertEquals(expectedMessage, resultDisplayHandle.getText());
        String capturedLog = testLogger.getTestCapturedLog();
        String expectedLogMessage = CURRENT_STATE_LOG_MESSAGE + expectedState + "\n"
                + CURRENT_COMMAND_LOG_MESSAGE + expectedCommand + "\n";
        assertEquals(capturedLog, expectedLogMessage);
    }
/**
     * Simulates an autocomplete with {@code commandBoxText} and verifies that the resulting string matches
     * {@code expectedResult} also verifies that the logged details match {@code expectedCommand}
     * and {@code expectedState}
     */
Simulates an autocomplete with  commandBoxText and verifies that the resulting string matches
expectedResult also verifies that the logged details match  expectedCommand
and  expectedState
Simulates an autocomplete with commandBoxText and verifies that the resulting string matches expectedResult also verifies that the logged details match expectedCommand and expectedState
private void assertAutocompleteSuccess(String commandBoxText, String expectedResult, String expectedMessage,
                   String expectedCommand, String expectedState) throws DataConversionException, IOException {
        TestLogger testLogger = new TestLogger(autocompleter.getClass(), Level.INFO);
        autocompleter.updateAutocompleter(commandBoxText);
        String autocompleteResult = autocompleter.autocomplete();
        assertEquals(expectedResult, autocompleteResult);
        guiRobot.pauseForEvent();
        assertEquals(expectedMessage, resultDisplayHandle.getText());
        String capturedLog = testLogger.getTestCapturedLog();
        String expectedLogMessage = CURRENT_STATE_LOG_MESSAGE + expectedState + "\n"
                + CURRENT_COMMAND_LOG_MESSAGE + expectedCommand + "\n";
        assertEquals(capturedLog, expectedLogMessage);
    }
private void assertAutocompleteSuccess ( String commandBoxText , String expectedResult , String expectedMessage , String expectedCommand , String expectedState ) throws DataConversionException , IOException { TestLogger testLogger = new TestLogger ( autocompleter . getClass ( ) , Level . INFO ) ; autocompleter . updateAutocompleter ( commandBoxText ) ; String autocompleteResult = autocompleter . autocomplete ( ) ; assertEquals ( expectedResult , autocompleteResult ) ; guiRobot . pauseForEvent ( ) ; assertEquals ( expectedMessage , resultDisplayHandle . getText ( ) ) ; String capturedLog = testLogger . getTestCapturedLog ( ) ; String expectedLogMessage = CURRENT_STATE_LOG_MESSAGE + expectedState + "\n" + CURRENT_COMMAND_LOG_MESSAGE + expectedCommand + "\n" ; assertEquals ( capturedLog , expectedLogMessage ) ; }
Simulates an autocomplete with {@code commandBoxText} and verifies that the resulting string matches
 {@code expectedResult} also verifies that the logged details match {@code expectedCommand}
 and {@code expectedState}
Simulates an autocomplete with { @code commandBoxText } and verifies that the resulting string matches { @code expectedResult } also verifies that the logged details match { @code expectedCommand } and { @code expectedState }