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);
        }
Exemple #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);
        }
        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));
        }        
Exemple #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));
        }