예제 #1
0
        public void ActivateMembershipRuleIsApplicableForActivateMemberShipProduct()
        {
            var product = new Product
            {
                Category = new ProductCategory
                {
                    Name = "ActivateMembership"
                }
            };

            Assert.That(_activateMemberShipRule.CanApply(product), Is.True);
        }
예제 #2
0
        public void Apply_Calls_Apply_Of_Rules()
        {
            // Arrange
            m_RuleOne.CanApply(Arg.Any <int>()).Returns(false);
            m_RuleTwo.CanApply(Arg.Any <int>()).Returns(true);
            m_RuleTwo.Apply(Arg.Any <int>()).Returns("Test");

            // Act
            string actual = m_Sut.Apply(1);

            // Assert
            Assert.AreEqual("Test",
                            actual);
        }