public void ShouldTurnOffCachingOfMethodAndEvictCache() { var comp = factory.Create <IObjectReturningNewGuids>(); var orgRes = comp.CachedMethod(); factory.DisableCache <IObjectReturningNewGuids>(); var newRes = comp.CachedMethod(); comp.CachedMethod().Should().Not.Be.EqualTo(newRes); factory.EnableCache <IObjectReturningNewGuids>(); comp.CachedMethod().Should().Not.Be.EqualTo(orgRes); }