public void TemplateMethod_Test() { var alg = new AlgorithmA(2, 3); var res = alg.TemplateMethod(); Assert.AreEqual(res, 8); }
static void Main(string[] args) { AlgorithmBase obj1 = new AlgorithmA(); obj1.TemplateMethod(); AlgorithmBase obj2 = new AlgorithmB(); obj2.TemplateMethod(); Console.Read(); }