public void RegisterFactories_ShouldRegisterMethodsOfObjectThatTakeNoParam()
        {
            var collection = new EntityFactoryFunctionCollection();

            var factoryClass = new FactoryClassWithNoParam();
            collection.RegisterFactories(factoryClass);

            var factoryFunction = collection.GetFactoryFunction<SimpleTestEntity>();

            Assert.Equal(factoryClass.SimpleTestEntity, factoryFunction(new Factory()));
        }
        public void RegisterFactories_ShouldRegisterMethodsOfObjectThatTakeFactoryParam()
        {
            var collection = new EntityFactoryFunctionCollection();

            var factoryClass = new FactoryClassWithParam();
            collection.RegisterFactories(factoryClass);

            var factoryFunction = collection.GetFactoryFunction<EntityWithMoneyProperty>();

            var expectedFactory = new Factory();
            Assert.Equal(factoryClass.EntityWithMoneyProperty, factoryFunction(expectedFactory));
            Assert.Equal(factoryClass.PassedFactory, expectedFactory);
        }