public void ActivateMembershipRuleIsApplicableForActivateMemberShipProduct() { var product = new Product { Category = new ProductCategory { Name = "ActivateMembership" } }; Assert.That(_activateMemberShipRule.CanApply(product), Is.True); }
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); }