コード例 #1
0
        public void GivenCSVAndJsonPathToAddIntoJSon_AfterSortingOnDensityArea_WhenAnalyse_ReturnPopulationstateforIndiaAndUS()
        {
            string lastValue         = JSONCensus.SortCSVInJsonAndReturnData(IndianCensusdata, JsonPathIndianCensus, "DensityPerSqKm");
            string PopulationDensity = JSONCensus.SortCSVInJsonAndReturnData(Uscensus, JsonPathUSCensus, "Population Density");

            Assert.IsTrue(lastValue.ToString().CompareTo(PopulationDensity.ToString()) < 0);
        }
コード例 #2
0
        public void GivenCSVStateCodeAndJsonPathToAddIntoJSon_AfterSorting_WhenAnalyse_ReturnFirstandLastState()
        {
            string firstValue = JSONCensus.SortCSVFileWriteInJsonAndReturnFirstData(Statecode, JsonPathstatecode, "StateCode");

            Assert.AreEqual("AD", firstValue);
            string lastValue = JSONCensus.SortCSVFileWriteInJsonAndReturnLastData(Statecode, JsonPathstatecode, "StateCode");

            Assert.AreEqual("WB", lastValue);
        }
コード例 #3
0
        public void GivenCSVAndJsonPathToAddIntoJSon_AfterSorting_WhenAnalyse_ReturnFirstandLastState()
        {
            string firstValue = JSONCensus.SortCSVFileWriteInJsonAndReturnFirstData(IndianCensusdata, JsonPathIndianCensus, "State");

            Assert.AreEqual("Andhra Pradesh", firstValue);
            string lastValue = JSONCensus.SortCSVFileWriteInJsonAndReturnLastData(IndianCensusdata, JsonPathIndianCensus, "State");

            Assert.AreEqual("West Bengal", lastValue);
        }
コード例 #4
0
        public void GivenCSVAndJsonPathToAddIntoJSon_AfterSortingOnDensityArea_WhenAnalyse_ReturnPopulationArea()
        {
            string Totalarea = JSONCensus.SortCSVInJsonAndReturnData(Uscensus, JsonPathUSCensus, "Total area");

            Assert.AreEqual("1723338.01", Totalarea);
        }
コード例 #5
0
        public void GivenCSVAndJsonPathToAddIntoJSon_AfterSortingOnPopulationDensity_WhenAnalyse_ReturnPopulationDensity()
        {
            string PopulationDensity = JSONCensus.SortCSVInJsonAndReturnData(Uscensus, JsonPathUSCensus, "Population Density");

            Assert.AreEqual("3805.61", PopulationDensity);
        }
コード例 #6
0
        public void GivenCSVAndJsonPathToAddIntoJSon_AfterSortingOnPopulation_WhenAnalyse_ReturnMostPopulationState()
        {
            string population = JSONCensus.SortCSVInJsonAndReturnData(Uscensus, JsonPathUSCensus, "Population");

            Assert.AreEqual("37253956", population);
        }
コード例 #7
0
        public void GivenCSVAndJsonPathToAddIntoJSon_AfterSortingOnArea_WhenAnalyse_ReturnlastState()
        {
            string lastValue = JSONCensus.SortCSVInJsonAndReturnData(IndianCensusdata, JsonPathIndianCensus, "AreaInSqKm");

            Assert.AreEqual("342239", lastValue);
        }
コード例 #8
0
        public void GivenCsvStateCensusAndJson_ToSortFromMostPopulousToLeast_WhenAnalyse_ReturnTheNumberOfSatetesSorted()
        {
            string population = JSONCensus.SortCSVInJsonAndReturnData(IndianCensusdata, JsonPathIndianCensus, "Population");

            Assert.AreEqual("199812341", population);
        }