Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 3
0
        public void GivenIncorrectFileTypeAndCSVState_WhenCompiled_ThenReturnsException()
        {
            CensusAnalyserException exception = Assert.ThrowsException <CensusAnalyserException>(() => CSVStates.GetRecord(WRONG_FILETYPE));

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