示例#1
0
        public void GivenCensusCSVFileAndCSVState_WhenNumberOfRecordMatch_ThenItShouldReturnTrue()
        {
            int CSVStateRecord    = CSVStates.GetRecord(FILE_PATH);
            int StateCensusRecord = StateCensusAnalyser.GetStateCensusRecord(STATE_CODE_FILE_PATH);

            Assert.AreEqual(CSVStateRecord, StateCensusRecord);
        }
示例#2
0
        public void GivenIncorrectDelimiterAndCSVState_WhenCompiled_ThenReturnsException()
        {
            CensusAnalyserException exception = Assert.ThrowsException <CensusAnalyserException>(() => CSVStates.GetRecord(STATE_CODE_FILE_PATH));

            Assert.AreEqual(CensusAnalyserException.ExceptionType.DELIMITER_INCORRECT, exception.type);
        }
示例#3
0
        public void GivenIncorrectFileTypeAndCSVState_WhenCompiled_ThenReturnsException()
        {
            CensusAnalyserException exception = Assert.ThrowsException <CensusAnalyserException>(() => CSVStates.GetRecord(WRONG_FILETYPE));

            Assert.AreEqual(CensusAnalyserException.ExceptionType.INCORRECT_FILETYPE, exception.type);
        }