public void GivenCensusCSVFileAndCSVState_WhenNumberOfRecordMatch_ThenItShouldReturnTrue() { int CSVStateRecord = CSVStates.GetRecord(FILE_PATH); int StateCensusRecord = StateCensusAnalyser.GetStateCensusRecord(STATE_CODE_FILE_PATH); Assert.AreEqual(CSVStateRecord, StateCensusRecord); }
public void GivenIncorrectDelimiterAndCSVState_WhenCompiled_ThenReturnsException() { CensusAnalyserException exception = Assert.ThrowsException <CensusAnalyserException>(() => CSVStates.GetRecord(STATE_CODE_FILE_PATH)); Assert.AreEqual(CensusAnalyserException.ExceptionType.DELIMITER_INCORRECT, exception.type); }
public void GivenIncorrectFileTypeAndCSVState_WhenCompiled_ThenReturnsException() { CensusAnalyserException exception = Assert.ThrowsException <CensusAnalyserException>(() => CSVStates.GetRecord(WRONG_FILETYPE)); Assert.AreEqual(CensusAnalyserException.ExceptionType.INCORRECT_FILETYPE, exception.type); }