Example #1
0
        public void BuildWithoutImplementation(Type type)
        {
            var factory = new GenericFactory(_genericImplementation, null, DependencyLifetime.Singleton);

            var contract = _genericImplementation.MakeGenericType(type);

            factory.Applicable(contract).Should().BeTrue();

            var dependency = factory.BuildDependency(contract, _engine);

            dependency.Implementation.Should().Be(contract);
        }
Example #2
0
        public void Applicable(Type type)
        {
            var contract = _genericContract.MakeGenericType(type);

            _factory.Applicable(contract).Should().BeTrue();
        }