Example #1
0
        public void SingletonTotalPopulationTest()
        {
            var rf    = new SingletonRecordFinder();
            var names = new string[] { "Seoul", "Mexico City" };
            int total = rf.GetTotalPopulation(names);

            Assert.That(total, Is.EqualTo(34900000));
        }
        public void SingletonTotalPopulationTest()
        {
            var rf    = new SingletonRecordFinder();
            var names = new[] { "Seoul", "Mexico City" };
            var tp    = rf.GetTotalCalculation(names);

            Assert.That(tp, Is.EqualTo(17500000 + 17400000));
        }
            public void SingletonTotalPopulationTest()
            {
                var rf    = new SingletonRecordFinder();
                var names = new[] { "Seoul", "Mexico City" };
                int tp    = rf.GetTotalPopulation(names);

                Assert.That(tp, Is.EqualTo(17500000 + 17400000)); // Have to manually enter values. If database is changed test will fail
            }
Example #4
0
        public void SingletonTotalPopulationTest()
        {
            var rf    = new SingletonRecordFinder();
            var names = new[] { "Seoul", "Mexico City" };
            int tp    = rf.GetTotalPopulation(names);

            Assert.AreEqual(tp, (17500000 + 17400000));
        }
Example #5
0
            public void SingletonTotalPopulationTest()
            {
                var rf    = new SingletonRecordFinder();
                var names = new[] { "Seoul", "Mexico City" };
                int tp    = rf.GetTotalPolulation(names);

                //f someone deletes mexico then test will continously fail as instance is already generated.
                Assert.That(tp, Is.EqualTo(17500000 + 17400000));
            }
Example #6
0
        public void SingletonTotalPopulationTest()
        {
            // testing on a live database
            var rf    = new SingletonRecordFinder();
            var names = new[] { "Seoul", "Mexico City" };
            var tp    = rf.TotalPopulation(names);

            Assert.That(tp, Is.EqualTo(17500000 + 17400000));
        }