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 BuilderWithoutKey()
        {
            ReflectionAggregateRootFactoryBuilder builder = new ReflectionAggregateRootFactoryBuilder()
                                                            .AddHistory()
                                                            .Add <IHelloService>(new HiHelloService());

            ReflectionAggregateRootFactory <AggregateWithParameters> factory = new ReflectionAggregateRootFactory <AggregateWithParameters>(builder);
        }
        public void BuilderWithParameterOfDifferentType()
        {
            ReflectionAggregateRootFactoryBuilder builder = new ReflectionAggregateRootFactoryBuilder()
                                                            .AddKey()
                                                            .AddHistory()
                                                            .Add("TEST");

            ReflectionAggregateRootFactory <AggregateWithParameters> factory = new ReflectionAggregateRootFactory <AggregateWithParameters>(builder);
        }
        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);
        }