예제 #1
0
        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();
        }
예제 #2
0
        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();
        }