Exemplo n.º 1
0
        public void GivenCallThrough_ThenTheResultShouldBeSaved()
        {
            var obj   = new Foo();
            var mock  = new CacheMock(null, false).AsMock();
            var cache = new Cache <Foo>(() => obj.Blah(), mock.Object);

            cache.Fetch();

            mock.Verify(x => x.Write(obj), Times.Once);
        }