public void ShouldCache() { using (var factory = new CacheBuilder(_proxyFactory) .For <ObjectReturningNewGuids>() .CacheMethod(c => c.CachedMethod()) .As <IObjectReturningNewGuids>() .BuildFactory()) { var component = factory.Create <IObjectReturningNewGuids>(); component.CachedMethod().Should().Be.EqualTo(component.CachedMethod()); } }
public void ShouldCache() { using (var factory = new CacheBuilder(_proxyFactory) .For<ObjectReturningNewGuids>() .CacheMethod(c => c.CachedMethod()) .As<IObjectReturningNewGuids>() .BuildFactory()) { var component = factory.Create<IObjectReturningNewGuids>(); component.CachedMethod().Should().Be.EqualTo(component.CachedMethod()); } }