示例#1
0
        public void AddCallTick(object instance)
        {
            if (!CallTicks.ContainsKey(instance))
            {
                CallTicks.Add(instance, 0);
            }

            CallTicks[instance]++;

            CallOrder.Add(instance.GetType());
        }
示例#2
0
        public void ConcreteResolver_ResolveChildInSettings_ResolvesChildInWaiterAfterCallingFactory()
        {
            //arrange
            CreateConcreteResolver(ImmutableDictionary <Type, Func <ActorBase> >
                                   .Empty
                                   .Add(typeof(BlackHoleActor), () =>
            {
                CallOrder.Add("Resolver");
                return(CreatedActor.UnderlyingActor);
            }));

            //act
            ResolveActor(typeof(BlackHoleActor));

            //assert
            CallOrder.Should().ContainInOrder("Resolver", nameof(IChildWaiter.ResolvedChild));
        }