Beispiel #1
0
        public void ReturnStoredData()
        {
            var model = new EnvironmentModel();

            var httpBaseMock = new Mock<HttpContextBase>();
            httpBaseMock.Setup(c => c.Application["Glimpse.AspNet.Environment"]).Returns(model);

            var contextMock = new Mock<ITabContext>();
            contextMock.Setup(c => c.GetRequestContext<HttpContextBase>()).Returns(httpBaseMock.Object);

            var request = new Glimpse.AspNet.Tab.Environment();
            var result = request.GetData(contextMock.Object);
             
            Assert.Same(model, result);
        }
        public void ReturnStoredData()
        {
            var model = new EnvironmentModel();

            var httpBaseMock = new Mock <HttpContextBase>();

            httpBaseMock.Setup(c => c.Application["Glimpse.AspNet.Environment"]).Returns(model);

            var contextMock = new Mock <ITabContext>();

            contextMock.Setup(c => c.GetRequestContext <HttpContextBase>()).Returns(httpBaseMock.Object);

            var request = new Glimpse.AspNet.Tab.Environment();
            var result  = request.GetData(contextMock.Object);

            Assert.Same(model, result);
        }
Beispiel #3
0
        public void HaveADocumentationUri()
        {
            var request = new Glimpse.AspNet.Tab.Environment();

            Assert.False(string.IsNullOrWhiteSpace(request.DocumentationUri));
        }
Beispiel #4
0
 public void BeNamedEnvironment()
 {
     var request = new Glimpse.AspNet.Tab.Environment();
     Assert.Equal("Environment", request.Name);
 }
Beispiel #5
0
 public void UseDefaultLifeCycleSupport()
 {
     var request = new Glimpse.AspNet.Tab.Environment();
     Assert.Equal(RuntimeEvent.EndRequest, request.ExecuteOn);
 }
Beispiel #6
0
        public void HaveProperContextObjectType()
        {
            var request = new Glimpse.AspNet.Tab.Environment();

            Assert.Equal(typeof(HttpContextBase), request.RequestContextType);
        }
        public void HaveADocumentationUri()
        {
            var request = new Glimpse.AspNet.Tab.Environment();

            Assert.False(string.IsNullOrWhiteSpace(request.DocumentationUri));
        }
        public void BeNamedEnvironment()
        {
            var request = new Glimpse.AspNet.Tab.Environment();

            Assert.Equal("Environment", request.Name);
        }
        public void UseDefaultLifeCycleSupport()
        {
            var request = new Glimpse.AspNet.Tab.Environment();

            Assert.Equal(RuntimeEvent.EndRequest, request.ExecuteOn);
        }
Beispiel #10
0
        public void HaveProperContextObjectType()
        {
            var request = new Glimpse.AspNet.Tab.Environment();

            Assert.Equal(typeof(HttpContextBase), request.RequestContextType);
        }