Пример #1
0
        public void ActorOf_gives_child_unique_name_if_not_specified()
        {
            //arrange
            var system = new ActorSystemImpl("test");
            system.Start(); //When we create a system manually we have to start it ourselves
            //act
            var child1 = system.ActorOf<TestActor>();
            var child2 = system.ActorOf<TestActor>();

            //assert
            Assert.NotEqual(child1.Path, child2.Path);
        }
Пример #2
0
        public void ActorOf_gives_child_unique_name_if_not_specified()
        {
            //arrange
            var system = new ActorSystemImpl("test");

            system.Start(); //When we create a system manually we have to start it ourselves
            //act
            var child1 = system.ActorOf <TestActor>();
            var child2 = system.ActorOf <TestActor>();

            //assert
            Assert.NotEqual(child1.Path, child2.Path);
        }
Пример #3
0
        public void ActorSystem_ActorOf_adds_a_child_to_Guardian()
        {
            //arrange
            var system = new ActorSystemImpl("test");
            system.Start(); //When we create a system manually we have to start it ourselves

            //act
            var child = system.ActorOf<TestActor>("test");

            //assert
            var children = system.Provider.Guardian.Children;
            Assert.True(children.Any(c => c == child));
        }        
Пример #4
0
        public void ActorSystem_ActorOf_adds_a_child_to_Guardian()
        {
            //arrange
            var system = new ActorSystemImpl("test");

            system.Start(); //When we create a system manually we have to start it ourselves

            //act
            var child = system.ActorOf <TestActor>("test");

            //assert
            var children = system.Provider.Guardian.Children;

            Assert.True(children.Any(c => c == child));
        }