public void WithoutParameters()
        {
            ReflectionAggregateRootFactory <AggregateWithParameters> factory = new ReflectionAggregateRootFactory <AggregateWithParameters>();
            AggregateWithParameters instance = factory.Create(KeyFactory.Create(typeof(AggregateWithParameters)), new List <IEvent>());

            Assert.IsNull(instance.Service);
        }
        public void BuilderWithParameter()
        {
            HiHelloService service = new HiHelloService();

            ReflectionAggregateRootFactoryBuilder builder = new ReflectionAggregateRootFactoryBuilder()
                                                            .AddKey()
                                                            .AddHistory()
                                                            .Add <IHelloService>(service);

            ReflectionAggregateRootFactory <AggregateWithParameters> factory = new ReflectionAggregateRootFactory <AggregateWithParameters>(builder);
            AggregateWithParameters instance = factory.Create(KeyFactory.Create(typeof(AggregateWithParameters)), new List <IEvent>());

            Assert.AreEqual(service, instance.Service);
        }