Exemplo n.º 1
0
        public void AutoDiscoverParameterNameOfDependency()
        {
            var expected = new TestType { Identifier = "Auto discovered parameter name" };
            var result = new SutBuilder<TestTypeWithConstructorArguments>().AddDependency(expected).Build();

            Assert.IsNotNull(result);
            Assert.AreEqual(expected.Identifier, result.TestType.Identifier);
            Assert.IsNull(result.TestType2.Identifier);
        }
Exemplo n.º 2
0
        public void BuildClassWithSingleOverriddenArgument()
        {
            var expected = new TestType { Identifier = "BuildClassWithSingleOverriddenArgument" };

            var sut = new SutBuilder<TestTypeWithConstructorArguments>();
            var result = sut.AddDependency(expected, "testType").Build();

            Assert.IsNotNull(result);
            Assert.AreEqual(expected, result.TestType);
        }
 public TestTypeWithNonInterfaceArgument(TestType testType, ITestType testType2)
 {
     this._testType = testType;
     this._testType2 = testType2;
 }