public void ForceRelease() { //shouldn't touch anything on these var httpContext = new Mock<HttpContextBase>(MockBehavior.Strict); var machineConfigReader = new Mock<IMachineConfigReader>(MockBehavior.Strict); using(new HttpContextScope(httpContext.Object)) { var reader = new DebugStatusReader(machineConfigReader.Object); reader.ForceRelease(); Assert.IsFalse(reader.IsDebuggingEnabled()); } httpContext.VerifyAll(); machineConfigReader.VerifyAll(); }
public void Predicate(bool predicateReturn) { //shouldn't touch anything on these var httpContext = new Mock<HttpContextBase>(MockBehavior.Strict); var machineConfigReader = new Mock<IMachineConfigReader>(MockBehavior.Strict); using (new HttpContextScope(httpContext.Object)) { var reader = new DebugStatusReader(machineConfigReader.Object); reader.ForceRelease(); Assert.AreEqual(predicateReturn, reader.IsDebuggingEnabled(() => predicateReturn)); } httpContext.VerifyAll(); machineConfigReader.VerifyAll(); }