public void GivenIndiaStateCodeCensusFileName_WhenImProperType_ShouldReturnException() { try { CensusAnalyzer.LoadIndiaCensusData(WrongIndiaStateCodeCSVFileType); } catch (CensusAnalyzerExceptions e) { Assert.AreEqual(CensusAnalyzerExceptions.ExceptionType.WRONG_FILE_TYPE, e.type); } }
public void GivenIndiaStatesCensusFileName_WhenImProperDelimiter_ShouldReturnException() { try { CensusAnalyzer.LoadIndiaCensusData(IndiaCensusCSVFilePath, ';'); } catch (CensusAnalyzerExceptions e) { Assert.AreEqual(CensusAnalyzerExceptions.ExceptionType.WRONG_FILE_DELIMITER, e.type); } }
public void GivenIndiaStateCodeFileName_WhenProper_ShouldReturnTotalRecords() { int noOfRecords = CensusAnalyzer.LoadIndiaCensusData(IndiaStateCodeCSVFilePath); Assert.AreEqual(37, noOfRecords); }