Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 4
0
        public void GivenCSVAndJsonPathToAddIntoJSon_AfterSortingOnDensityArea_WhenAnalyse_ReturnPopulationArea()
        {
            string Totalarea = JSONCensus.SortCSVInJsonAndReturnData(Uscensus, JsonPathUSCensus, "Total area");

            Assert.AreEqual("1723338.01", Totalarea);
        }
Esempio n. 5
0
        public void GivenCSVAndJsonPathToAddIntoJSon_AfterSortingOnPopulationDensity_WhenAnalyse_ReturnPopulationDensity()
        {
            string PopulationDensity = JSONCensus.SortCSVInJsonAndReturnData(Uscensus, JsonPathUSCensus, "Population Density");

            Assert.AreEqual("3805.61", PopulationDensity);
        }
Esempio n. 6
0
        public void GivenCSVAndJsonPathToAddIntoJSon_AfterSortingOnPopulation_WhenAnalyse_ReturnMostPopulationState()
        {
            string population = JSONCensus.SortCSVInJsonAndReturnData(Uscensus, JsonPathUSCensus, "Population");

            Assert.AreEqual("37253956", population);
        }
Esempio n. 7
0
        public void GivenCSVAndJsonPathToAddIntoJSon_AfterSortingOnArea_WhenAnalyse_ReturnlastState()
        {
            string lastValue = JSONCensus.SortCSVInJsonAndReturnData(IndianCensusdata, JsonPathIndianCensus, "AreaInSqKm");

            Assert.AreEqual("342239", lastValue);
        }
Esempio n. 8
0
        public void GivenCsvStateCensusAndJson_ToSortFromMostPopulousToLeast_WhenAnalyse_ReturnTheNumberOfSatetesSorted()
        {
            string population = JSONCensus.SortCSVInJsonAndReturnData(IndianCensusdata, JsonPathIndianCensus, "Population");

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