Beispiel #1
0
        public async Task CreateAsync_CallsConstructor()
        {
            var activator = new DefaultActorActivator();

            var host  = new ActorHost(ActorTypeInformation.Get(typeof(TestActor)), ActorId.CreateRandom(), JsonSerializerDefaults.Web, NullLoggerFactory.Instance, ActorProxy.DefaultProxyFactory);
            var state = await activator.CreateAsync(host);

            Assert.IsType <TestActor>(state.Actor);
        }
Beispiel #2
0
        public async Task CreateAsync_CallsConstructor()
        {
            var activator = new DefaultActorActivator();

            var host  = ActorHost.CreateForTest <TestActor>();
            var state = await activator.CreateAsync(host);

            Assert.IsType <TestActor>(state.Actor);
        }