Example #1
0
        private static async Task <SensorActor> CreateSensorActor()
        {
            var target = new SensorActor();

            PropertyInfo idProperty = typeof(ActorBase).GetProperty("Id");

            idProperty.SetValue(target, new ActorId(Guid.NewGuid()));

            PropertyInfo stateManagerProperty = typeof(SensorActor).GetProperty("StateManager");

            stateManagerProperty.SetValue(target, new MockActorStateManager());
            await target.InitializeActorState();

            return(target);
        }