public void GivenWrongStateCodeFileType_WhenAnalyseForStateCensus_ThenShouldThrowHeadearNotMathedException() { IndianStateAnalyserException e = Assert.Throws <IndianStateAnalyserException>(() => IndiaStateCensusAnalyser.StateCensusAnalyser.CheckForHeader(STATE_CODE_CSV_FILE_PATH, CSV_FILE_PATH)); Assert.AreEqual(IndianStateAnalyserException.ExceptionType.HEADER_NOT_MATCHED_EXCEPTION, e.type); }
public void GivenWrongFileDelimiter_WhenAnalyseForStateCensus_ThenShouldThrowException() { IndianStateAnalyserException e = Assert.Throws <IndianStateAnalyserException>(() => new IndiaStateCensusAnalyser.StateCensusAnalyser(WRONG_DELIMITER_CSV_FILE_PATH).GetStateCensusRecords()); Assert.AreEqual(IndianStateAnalyserException.ExceptionType.WRONG_CSV_DELIMITER_EXCEPTION, e.type); }
public void GivenWrongStateCodeFileType_WhenAnalyseForStateCensus_ThenShouldThrowException() { IndianStateAnalyserException e = Assert.Throws <IndianStateAnalyserException>(() => new IndiaStateCensusAnalyser.StateCensusAnalyser(STATE_CODE_NOT_CSV_FILE_PATH).GetStateCensusRecords()); Assert.AreEqual(IndianStateAnalyserException.ExceptionType.NOT_CSV_FILE_EXCEPTION, e.type); }
public void GivenWrongCSVFile_WhenAnalyseForStateCensus_ThenShouldThrowException() { IndianStateAnalyserException e = Assert.Throws <IndianStateAnalyserException>(() => new IndiaStateCensusAnalyser.StateCensusAnalyser(CSV_FILE_PATH, WRONG_CSV_FILE_PATH).GetStateCensusRecords()); Assert.AreEqual(IndianStateAnalyserException.ExceptionType.CENSUS_FILE_PROBLEM_EXCEPTION, e.type); }