예제 #1
0
        public void SendThreeMessages()
        {
            int total = 0;

            Actor actor = new LambdaActor(c => { total += (int)c; });

            actor.Receive(1);
            actor.Receive(2);
            actor.Receive(3);

            Assert.AreEqual(6, total);
        }
예제 #2
0
        public void SendOneMessage()
        {
            int total = 0;

            Actor actor = new LambdaActor(c => { total += (int)c; });

            actor.Receive(1);

            Assert.AreEqual(1, total);
        }