Esempio n. 1
0
        public void Execute_WithNullContext_Throws()
        {
            // Arrange
            NotFoundAction  action  = new NotFoundAction();
            IRewriteContext context = null;

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

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

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