コード例 #1
0
        public void TranslateItemFilterBlockToString_SocketGroup_ReturnsCorrectString()
        {
            // Arrange
            var expectedResult = "Show" + Environment.NewLine +
                                 "    SocketGroup \"RRG\" \"GBB\"";

            var socketGroupBlockItem = new SocketGroupBlockItem();
            socketGroupBlockItem.Items.Add("RRG");
            socketGroupBlockItem.Items.Add("GBB");
            _testUtility.TestBlock.BlockItems.Add(socketGroupBlockItem);

            // Act
            var result = _testUtility.Translator.TranslateItemFilterBlockToString(_testUtility.TestBlock);

            // Assert
            Assert.AreEqual(expectedResult, result);
        }
コード例 #2
0
        public void ItemBlockItemMatch_SocketGroupBlockItem_SingleItemSocketGroup_SingleBlockItemSocketGroup_NoMatch_ReturnsCorrectResult()
        {
            //Arrange
            var testInputBlockItem = new SocketGroupBlockItem();
            testInputBlockItem.Items.Add("RGB");

            var testInputItem = Mock.Of<IItem>(i => i.LinkedSocketGroups == new List<SocketGroup>
            {
                new SocketGroup(new List<Socket>
                {
                    new Socket(SocketColor.Red),
                    new Socket(SocketColor.Green)
                }, true)
            });

            //Act
            var result = _testUtility.BlockItemMatcher.ItemBlockItemMatch(testInputBlockItem, testInputItem);

            //Assert
            Assert.IsFalse(result);
        }