public void GivenIncorrectStateCodeDelimiter_ShouldThrowException() { CensusAnalyserException.ExceptionType expected = CensusAnalyserException.ExceptionType.INCORRECT_DELIMETER; try { stateRecord = censusAnalyser.LoadCensusData(CensusAnalyser.Country.INDIA, delimiterIndianStateCodeFilePath, indianStateCodeHeaders); } catch (CensusAnalyserException cae) { CensusAnalyserException.ExceptionType actual = cae.eType; Assert.AreEqual(expected, actual); } }
public void GivenIncorrectStateCodeFileType_ShouldThrowException() { CensusAnalyserException.ExceptionType expected = CensusAnalyserException.ExceptionType.INVALID_FILE_TYPE; try { stateRecord = censusAnalyser.LoadCensusData(CensusAnalyser.Country.INDIA, wrongindianStateCodeFileType, indianStateCensusHeaders); } catch (CensusAnalyserException cae) { CensusAnalyserException.ExceptionType actual = cae.eType; Assert.AreEqual(expected, actual); } }