Beispiel #1
0
        public void stash_test2()
        {
            //Arrange
            var pingPongActor = MockFactory
                                .WhenActorReceives <PingMessage>()
                                .ItShouldDo((a) => a.Stash.Stash())
                                .CreateMockActorRef <MockActor2>();

            //Act
            pingPongActor.Tell(new PingMessage());

            System.Threading.Thread.Sleep(TimeSpan.FromSeconds(3));
            MockFactory.ClearAllMessages();

            //Assert
            Assert.Throws <Exception>(() => MockFactory.ExpectMockActor(pingPongActor).ToHaveReceivedMessage <PingMessage>());
        }