/// <summary> /// Defines the program entry point. /// </summary> /// <param name="args">An array of <see cref="T:System.String"/> containing command line parameters.</param> private static void Main(string[] args) { Dependent test = new Dependent(); test.IDependency1 = new Dependency1(); test.IDependency2 = new Dependency2(); test.IDependency3 = new Dependency3(); test.DoSomeATestWorkWithPropertyInjection(); }
public void TestMethod1() { string expected = "God - loves - you."; TestDependency1 testDependency1 = new TestDependency1(); TestDependency2 testDependency2 = new TestDependency2(); TestDependency3 testDependency3 = new TestDependency3(); Dependent dependent = new Dependent(); dependent.IDependency1 = new TestDependency1(); dependent.IDependency2 = new TestDependency2(); dependent.IDependency3 = new TestDependency3(); string actual = dependent.DoSomeATestWorkWithPropertyInjection(); Assert.AreEqual(expected, actual); }