public void GivenCSVStateCodeFile_WhenNumberOfRecordsMatches_ShoulReturnTrue() { string filePath = @"E:\CodinClub\Assignments_Fellowship\Indian-State-Census-Analyzer-Problem\StateCensusAnalyser\StateCensusAnalyser\IndiaStateCode.csv"; int CSVRecords = CSVStates.GetRecords(filePath); int records = StateCensusAnalyser.StateCodeAnalyser.GetStateCodeRecords(filePath); Assert.AreEqual(CSVRecords, records); }
public void GivenCSVStateCodeFilePath_WhenIncorrect_ShouldThrowCustomException() { try { string filePath = @"C:\Assignments_Fellowship\Indian-State-Census-Analyzer-Problem\StateCensusAnalyser\StateCensusAnalyser\IndiaStateCode.csv"; int CSVRecords = CSVStates.GetRecords(filePath); int records = StateCensusAnalyser.StateCodeAnalyser.GetStateCodeRecords(filePath); Assert.AreEqual(CSVRecords, records); } catch (StateCensusAnalyserException e) { Assert.AreEqual(StateCensusAnalyserException.ExceptionType.INVALID_PATH, e.type); } }