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); }
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); }
public void HaveProperContextObjectType() { var request = new Glimpse.AspNet.Tab.Environment(); Assert.Equal(typeof(HttpContextBase), request.RequestContextType); }