Example #1
0
        public ActorRefMock MockActorOf<TActor>(string id)
        {
            var path = ActorPath.From(typeof(TActor), id);

            if (expected.ContainsKey(path))
                return expected[path];

            var mock = new ActorRefMock(path);
            expected.Add(path, mock);

            return mock;
        }
Example #2
0
        ActorRefMock GetOrCreateMock(ActorPath path)
        {
            if (actors.ContainsKey(path))
            {
                return(actors[path]);
            }

            var mock = new ActorRefMock(path, serialization);

            actors.Add(path, mock);

            return(mock);
        }
Example #3
0
        public ActorRefMock MockActorOf <TActor>(string id)
        {
            var path = ActorPath.From(typeof(TActor), id);

            if (expected.ContainsKey(path))
            {
                return(expected[path]);
            }

            var mock = new ActorRefMock(path, serializer);

            expected.Add(path, mock);

            return(mock);
        }
Example #4
0
        ActorRef IActorSystem.ActorOf(ActorPath path)
        {
            if (expected.ContainsKey(path))
            {
                return(expected[path]);
            }

            if (unexpected.ContainsKey(path))
            {
                return(unexpected[path]);
            }

            var mock = new ActorRefMock(path);

            unexpected.Add(path, mock);

            return(mock);
        }
Example #5
0
 public void SetUp()
 {
     actor = new ActorRefMock(ActorPath.For <ITestActor>(Guid.NewGuid().ToString("D")));
 }
Example #6
0
 public void SetUp()
 {
     actor = new ActorRefMock(ActorPath.From("Orleankka.TestKit.TestActor", Guid.NewGuid().ToString("D")));
 }
 public void SetUp()
 {
     actor = new ActorRefMock(ActorPath.From("Orleankka.TestKit.TestActor", Guid.NewGuid().ToString("D")), SerializationOptions.Default);
 }
 public BackgroundJobServiceMock()
 {
     Host   = new ActorRefMock(ActorPath.Parse("mock:self"));
     timers = new TimerServiceMock();
 }
Example #9
0
 public void SetUp()
 {
     actor = new ActorRefMock(ActorPath.From(typeof(TestActor), Guid.NewGuid().ToString("D")));
 }
 public void SetUp()
 {
     actor = new ActorRefMock(ActorPath.From("mock::" + Guid.NewGuid().ToString("D")));
 }