コード例 #1
0
ファイル: ActorTests.cs プロジェクト: stjordanis/Aktores
        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
ファイル: ActorTests.cs プロジェクト: stjordanis/Aktores
        public void SendOneMessage()
        {
            int total = 0;

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

            actor.Receive(1);

            Assert.AreEqual(1, total);
        }