public void IsMatch_WhenNoConditions_ReturnsTrue() { // Arrange RedirectAction action = new RedirectAction("/", true); IRewriteContext context = new MockRewriteContext(); // Act bool match = action.IsMatch(context); // Assert Assert.IsTrue(match); }
public void IsMatch_WhenMixedConditions_ReturnsFalse() { // Arrange RedirectAction action = new RedirectAction("/", true); IRewriteContext context = new MockRewriteContext(); action.Conditions.Add(new MockRewriteCondition(true)); action.Conditions.Add(new MockRewriteCondition(false)); // Act bool match = action.IsMatch(context); // Assert Assert.IsFalse(match); }
public void IsMatch_WhenSingleConditionDoesNotMatch_ReturnsFalse() { // Arrange RedirectAction action = new RedirectAction("/", true); IRewriteContext context = new MockRewriteContext(); action.Conditions.Add(new MockRewriteCondition(false)); // Act bool match = action.IsMatch(context); // Assert Assert.IsFalse(match); }