public void SetUp() { thingService = A.Fake <IThingService>(); A.CallTo(() => thingService.TryRead(thingId1, out thing1)).Returns(true); A.CallTo(() => thingService.TryRead(thingId2, out thing2)).Returns(true); A.CallTo(() => thingService.TryRead(thingIdNotExisted, out thing3)).Returns(false); thingCache = new ThingCache(thingService); }
public void SetUp() { thingService = A.Fake <IThingService>(); thingCache = new ThingCache(thingService); thing1 = new Thing(thingId1); thing2 = new Thing(thingId2); }
public void Configure() { service = A.Fake <IThingService>(); cache = new ThingCache(service); A.CallTo(() => service.TryRead(A <string> .Ignored, out thing1)).Returns(false); A.CallTo(() => service.TryRead(thingKey1, out thing1)) .Returns(true); A.CallTo(() => service.TryRead(thingKey2, out thing2)) .Returns(true); }
public void SetUp() { thingService = A.Fake <IThingService>(); thingCache = new ThingCache(thingService); Thing thing; A.CallTo(() => thingService.TryRead(A <string> .Ignored, out thing)).Returns(false); A.CallTo(() => thingService.TryRead(thingId1, out thing)).Returns(true) .AssignsOutAndRefParameters(thing1); A.CallTo(() => thingService.TryRead(thingId2, out thing)).Returns(true) .AssignsOutAndRefParameters(thing2);; }
public void SetUp() { thingService = A.Fake <IThingService>(); thingCache = new ThingCache(thingService); Thing _ = null; A.CallTo(() => thingService.TryRead(thingId1, out _)) .Returns(true) .AssignsOutAndRefParameters(thing1); A.CallTo(() => thingService.TryRead(thingId2, out _)) .Returns(true) .AssignsOutAndRefParameters(thing2); }
public void SetUp() { //thingService = A... thingCache = new ThingCache(thingService); }
public void TearDown() { thingService = null; thingCache = null; }
public void SetUp() { thingService = A.Fake <IThingService>(); thingCache = new ThingCache(thingService); }