Пример #1
0
 public void GivenUsCensusCSVData_WhenSorting_WhenAnalyseCsvtoJson_ReturnSmallestPopulationDencity()
 {
     try
     {
         CensusAnalyser censusAnalyser = new CensusAnalyser(usaFilePath);
         censusAnalyser.LoadUsCencusData();
         JArray sortedData = censusAnalyser.GetpopulationDencityWiseSortedUsCensusDataAndIndianStateCensusData(usaCensusJsonPath, "PopulationDencity", 50);
         Assert.AreEqual("2.24", sortedData[50]["PopulationDencity"].ToString());
     }
     catch (CensusAnalyserException e)
     {
         Assert.AreEqual(CensusAnalyserException.ExceptionType.FILE_NOT_FOUND, e.Type);
     }
 }
Пример #2
0
 public void GivenIndianCensusCSVData_WhenSorting_WhenAnalyseCsvtoJson_ReturnPopulationDencity()
 {
     try
     {
         CensusAnalyser censusAnalyser = new CensusAnalyser(indiaCensusCsvFilePath);
         censusAnalyser.LoadIndiaCensusData();
         JArray sortedData = censusAnalyser.GetpopulationDencityWiseSortedUsCensusDataAndIndianStateCensusData(indiaStateCensusJsonPath, "DencityPerSqKm", 0);
         Assert.AreEqual("50", sortedData[0]["DencityPerSqKm"].ToString());
     }
     catch (CensusAnalyserException e)
     {
         Assert.AreEqual(CensusAnalyserException.ExceptionType.FILE_NOT_FOUND, e.Type);
     }
 }