Пример #1
0
 public HotmodStream(Stream outputStream, HttpContextBase httpContext, HotmodSection config)
 {
     this.outputStream = outputStream;
     this.encoding = httpContext.Response.ContentEncoding;
     this.httpContext = httpContext;
     this.config = config;
     this.modifiers = CreateModifiers(config.Modifiers).ToArray();
 }
Пример #2
0
 public HotmodStreamTests()
 {
     config = new HotmodSection();
     outputStream = new MemoryStream();
     httpContext = new Mock<HttpContextBase>();
     httpContext.Setup(c => c.Response.OutputStream).Returns(outputStream);
     httpContext.Setup(c => c.Response.ContentEncoding).Returns(Encoding.ASCII);
     httpContext.Setup(c => c.Response.ContentType).Returns("text/html");
     streamUnderTest = new HotmodStream(outputStream, httpContext.Object, config);
 }