public void MissingProbe()
        {
            IPing grain = Silo.CreateGrain <PingGrain>(1);

            //There should not be an exception, since we are using loose grain generation
            grain.Invoking(p => p.Ping()).ShouldNotThrow();
        }
Example #2
0
        public async Task MissingProbe()
        {
            IPing grain = await Silo.CreateGrainAsync <PingGrain>(1);

            //There should not be an exception, since we are using loose grain generation
            grain.Invoking(p => p.Ping()).Should().NotThrow();
        }
Example #3
0
        public async Task InvalidProbeType()
        {
            IPing grain = await Silo.CreateGrainAsync <PingGrain>(1);

            //This correct id, but a different grain type
            var pong = Silo.AddProbe <IPong2>(22);

            grain.Invoking(p => p.Ping()).Should().NotThrow();

            pong.Verify(p => p.Pong2(), Times.Never);
        }
Example #4
0
        public async Task InvalidProbe()
        {
            IPing grain = await Silo.CreateGrainAsync <PingGrain>(1);

            //This uses the wrong id for the IPong since this is hard coded within PingGrain
            var pong = Silo.AddProbe <IPong>(0);

            grain.Invoking(p => p.Ping()).Should().NotThrow();

            pong.Verify(p => p.Pong(), Times.Never);
        }
Example #5
0
        public async Task InvalidProbeType()
        {
            IPing grain = await Silo.CreateGrainAsync <PingGrain>(1);

            //This uses the correct id, but the wrong grain type
            var pong = Silo.AddProbe <IPong2>(22);

            await grain.Invoking(p => p.Ping()).Should().ThrowExactlyAsync <Exception>();

            pong.Verify(p => p.Pong2(), Times.Never);
        }
        public void InvalidProbeType()
        {
            IPing grain = Silo.CreateGrain <PingGrain>(1);

            //This uses the correct id, but the wrong grain type
            var pong = Silo.AddProbe <IPong2>(22);

            grain.Invoking(p => p.Ping()).ShouldThrowExactly <Exception>();

            pong.Verify(p => p.Pong2(), Times.Never);
        }
        public void InvalidProbe()
        {
            IPing grain = Silo.CreateGrain <PingGrain>(1);

            //This uses the wrong id for the IPong since this is hard coded within PingGrain
            var pong = Silo.AddProbe <IPong>(0);

            grain.Invoking(p => p.Ping()).ShouldThrowExactly <Exception>();

            pong.Verify(p => p.Pong(), Times.Never);
        }
Example #8
0
        public async Task MissingProbe()
        {
            IPing grain = await Silo.CreateGrainAsync <PingGrain>(1);

            await grain.Invoking(p => p.Ping()).Should().ThrowExactlyAsync <Exception>();
        }
Example #9
0
        public async Task MissingProbe()
        {
            IPing grain = Silo.CreateGrain <PingGrain>(1);

            grain.Invoking(p => p.Ping()).ShouldThrowExactly <Exception>();
        }