Пример #1
0
        public void GetTotalPopulation_CalculateForSomeInputs_ReturnTheSumCorrectly()
        {
            var finder = new ConfigurableRecordFinder(new DummyDatabase());
            var total  = finder.GetTotalPopulation(new string[] { "alpha", "gama" });

            Assert.That(total, Is.EqualTo(4));
        }
Пример #2
0
        public void DependantTotalPopulationTest()
        {
            var db = new DummyDatabase();
            var rf = new ConfigurableRecordFinder(db);

            Assert.That(rf.GetTotalPopulation(new[] { "alpha", "gamma" }), Is.EqualTo(4));
        }
Пример #3
0
        public void SingletonConfigurablePopulationTest()
        {
            var crf   = new ConfigurableRecordFinder(new DummyDatabase());
            var names = new string[] { "alpha", "beta", "gamma" };
            int total = crf.GetTotalPopulation(names);

            Assert.That(total, Is.EqualTo(6));
        }
Пример #4
0
        public void ConfigurablePopulationTest()
        {
            var rf    = new ConfigurableRecordFinder(new DummyDatabase());
            var names = new[] { "alpha", "gamma" };
            int tp    = rf.GetTotalPopulation(names);

            Assert.That(tp, Is.EqualTo(4));
        }
Пример #5
0
        public void ConfigurableTotalPopulationTest()
        {
            var rf = new ConfigurableRecordFinder(new TestDatabase());
            IEnumerable <string> names = new[] { "alpha", "gamma" };

            int tp = rf.GetTotalPopulation(names);

            Assert.Equal(4, tp);
        }
Пример #6
0
        public void ConfigurableRecordFinderTest()
        {
            // Arrange
            var rf    = new ConfigurableRecordFinder(new DummyDatabase());
            var names = new[] { "alpha", "gamma" };

            // Act
            var resutl = rf.GetTotalPopulation(names);

            // Assert
            Assert.That(resutl, Is.EqualTo(4));
        }