static void Main(string[] args) { AppBAL.Magician magObj = new AppBAL.Magician(); int result = magObj.DoMagic("ABC"); if (result == 10) { System.Console.WriteLine("Test Passed"); } System.Console.ReadKey(); }
static void Main(string[] args) { //AppBAL.Magician magObj = new AppBAL.Magician(); IMagicHelper obj = new MagicHelper(); //Injecting the dependency from outside AppBAL.Magician magObj = new AppBAL.Magician(obj); int result = magObj.DoMagic("ABC"); if (result == 10) { System.Console.WriteLine("Test Passed"); } System.Console.ReadKey(); }