コード例 #1
0
 public void TestMethod1()
 {
     string expected = "God - bless - us.";
     Dependent dependent = new Dependent();
     string actual = dependent.DoSomeATestWorkWithMethodInjection(new TestDependency1(), new TestDependency2(), new TestDependency3());
     Assert.AreEqual(expected, actual);
 }
コード例 #2
0
 /// <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 dependent = new Dependent();
     IDependency1 test1 = new Dependency1();
     IDependency2 test2 = new Dependency2();
     IDependency3 test3 = new Dependency3();
     dependent.DoSomeATestWorkWithMethodInjection(test1, test2, test3);
 }