Example #1
0
 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);
 }
Example #2
0
        public void SetUp()
        {
            thingService = A.Fake <IThingService>();
            thingCache   = new ThingCache(thingService);

            thing1 = new Thing(thingId1);
            thing2 = new Thing(thingId2);
        }
Example #3
0
 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);
 }
Example #4
0
        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);;
        }
Example #5
0
        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);
        }
Example #6
0
 public void SetUp()
 {
     //thingService = A...
     thingCache = new ThingCache(thingService);
 }
Example #7
0
 public void TearDown()
 {
     thingService = null;
     thingCache   = null;
 }
Example #8
0
 public void SetUp()
 {
     thingService = A.Fake <IThingService>();
     thingCache   = new ThingCache(thingService);
 }