Ejemplo n.º 1
0
        public void Execute_WithNullContext_Throws()
        {
            // Arrange
            GoneAction      action  = new GoneAction();
            IRewriteContext context = null;

            // Act/Assert
            ExceptionAssert.Throws <ArgumentNullException>(() => action.Execute(context));
        }
Ejemplo n.º 2
0
        public void Execute_SetsStatusCode_ReturnsStopProcessing()
        {
            // Arrange
            GoneAction      action  = new GoneAction();
            IRewriteContext context = new MockRewriteContext();

            // Act
            RewriteProcessing result = action.Execute(context);

            // Assert
            Assert.AreEqual(HttpStatusCode.Gone, context.StatusCode);
            Assert.AreEqual(RewriteProcessing.StopProcessing, result);
        }