Exemplo n.º 1
0
        public void GetBestCombinationTwoAndTwoSymbolsTest()
        {
            var input = new List<ScientificSymbol> { ScientificSymbol.Gear, ScientificSymbol.Gear, ScientificSymbol.Tablet, ScientificSymbol.Tablet };
            var output1 = ScientificStructuresCategory.GetBestCombination(input, 1);

            Assert.AreEqual(1, output1.Count(s => s == ScientificSymbol.Compass));
        }
Exemplo n.º 2
0
        public void GetBestCombinationThreeSameSymbolsTest()
        {
            var input = new List<ScientificSymbol> { ScientificSymbol.Compass, ScientificSymbol.Compass, ScientificSymbol.Compass };
            var output1 = ScientificStructuresCategory.GetBestCombination(input, 2);

            Assert.AreEqual(5, output1.Count(s => s == ScientificSymbol.Compass));
        }
Exemplo n.º 3
0
        public void GetBestCombinationTwoSameSymbolsTest()
        {
            var input = new List<ScientificSymbol> { ScientificSymbol.Gear, ScientificSymbol.Gear };
            var output1 = ScientificStructuresCategory.GetBestCombination(input, 1);

            var output2 = ScientificStructuresCategory.GetBestCombination(input, 2);

            Assert.AreEqual(3, output1.Count(s => s == ScientificSymbol.Gear));

            Assert.AreEqual(4, output2.Count(s => s == ScientificSymbol.Gear));
        }
Exemplo n.º 4
0
        public void GetBestCombinationThreeAndOneAndOneSymbolsTest()
        {
            var input = new List<ScientificSymbol> { ScientificSymbol.Gear, ScientificSymbol.Gear, ScientificSymbol.Gear, ScientificSymbol.Tablet, ScientificSymbol.Compass };
            var output1 = ScientificStructuresCategory.GetBestCombination(input, 1);

            var output2 = ScientificStructuresCategory.GetBestCombination(input, 2);

            Assert.AreEqual(4, output1.Count(s => s == ScientificSymbol.Gear));

            Assert.AreEqual(5, output2.Count(s => s == ScientificSymbol.Gear));
        }
Exemplo n.º 5
0
        public void GetBestCombinationThreeDifferentSymbolsTest()
        {
            var input = new List<ScientificSymbol> { ScientificSymbol.Gear, ScientificSymbol.Compass, ScientificSymbol.Tablet };
            var output1 = ScientificStructuresCategory.GetBestCombination(input, 2);

            var output2 = ScientificStructuresCategory.GetBestCombination(input, 3);

            Assert.AreEqual(3, output1.Count(s => s == ScientificSymbol.Compass));

            Assert.AreEqual(2, output2.Count(s => s == ScientificSymbol.Compass));
            Assert.AreEqual(2, output2.Count(s => s == ScientificSymbol.Gear));
            Assert.AreEqual(2, output2.Count(s => s == ScientificSymbol.Tablet));
        }
Exemplo n.º 6
0
        public void GetBestCombinationOneSymbolTest()
        {
            var input = new List<ScientificSymbol> { ScientificSymbol.Gear };
            var output1 = ScientificStructuresCategory.GetBestCombination(input, 1);

            var output2 = ScientificStructuresCategory.GetBestCombination(input, 2);

            Assert.AreEqual(2, output1.Count(s => s == ScientificSymbol.Gear));

            Assert.AreEqual(1, output2.Count(s => s == ScientificSymbol.Gear));
            Assert.AreEqual(1, output2.Count(s => s == ScientificSymbol.Tablet));
            Assert.AreEqual(1, output2.Count(s => s == ScientificSymbol.Compass));
        }