コード例 #1
0
        public void OnApplicationError_WithHttpUnhandledExceptionContainingNoInnerException_Transfers()
        {
            // arrange
            var    app = new SubtextApplication(null);
            string transferLocation = null;
            var    server           = new Mock <HttpServerUtilityBase>();

            server.Setup(s => s.Transfer(It.IsAny <string>())).Callback <string>(s => transferLocation = s);

            // act
            app.OnApplicationError(new HttpUnhandledException(), server.Object, new Mock <ILog>().Object, null);

            // assert
            Assert.AreEqual("~/aspx/SystemMessages/error.aspx", transferLocation);
        }