public void Execute_WithNullContext_Throws() { // Arrange RewriteAction action = new RewriteAction("/", RewriteProcessing.RestartProcessing); IRewriteContext context = null; // Act/Assert ExceptionAssert.Throws<ArgumentNullException>(() => action.Execute(context)); }
public void Execute_WithNullContext_Throws() { // Arrange RewriteAction action = new RewriteAction("/", RewriteProcessing.RestartProcessing); IRewriteContext context = null; // Act/Assert ExceptionAssert.Throws <ArgumentNullException>(() => action.Execute(context)); }
public void Execute_SetsLocation_ReturnsCorrectValue() { // Arrange string location = "/NewLocation"; RewriteProcessing processing = RewriteProcessing.RestartProcessing; RewriteAction action = new RewriteAction(location, processing); action.Conditions.Add(new MockRewriteCondition(true)); IRewriteContext context = new MockRewriteContext(); // Act RewriteProcessing result = action.Execute(context); // Assert Assert.AreEqual(processing, result); Assert.AreEqual(location, context.Location); }