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

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