Наследование: IOutputState, IRecordedOutput
        private IRecordedOutput getOutputWithEtag(string etag)
        {
            var output = new RecordedOutput(null);
            output.AppendHeader(HttpResponseHeaders.ETag, etag);

            return output;
        }
Пример #2
0
        public void Eject_clears()
        {
            Func<IRecordedOutput> shouldNotBeCalled = () =>
            {
                Assert.Fail("Do not call me");
                return null;
            };

            var output1 = getOutputWithEtag("12345");
            theOutputCache.Retrieve("12345", () => output1).ShouldBeTheSameAs(output1);
            theOutputCache.Eject("12345");

            var output2 = new RecordedOutput(null);
            theOutputCache.Retrieve("12345", () => output2).ShouldBeTheSameAs(output2);
            theOutputCache.Retrieve("12345", shouldNotBeCalled).ShouldBeTheSameAs(output2);
            theOutputCache.Retrieve("12345", shouldNotBeCalled).ShouldBeTheSameAs(output2);
            theOutputCache.Retrieve("12345", shouldNotBeCalled).ShouldBeTheSameAs(output2);
            theOutputCache.Retrieve("12345", shouldNotBeCalled).ShouldBeTheSameAs(output2);
            theOutputCache.Retrieve("12345", shouldNotBeCalled).ShouldBeTheSameAs(output2);
        }
Пример #3
0
 public void SetUp()
 {
     theHttpWriter = MockRepository.GenerateMock<IHttpWriter>();
     theRecordedOutput = new RecordedOutput(new FileSystem());
 }
 public FinishedRecordingOutput(RecordedOutput output)
 {
     _output = output;
 }