I've found a couple of articles about testing protected methods and have written the appropriate code to do so.
However, now I want to test my class, which includes a public abstract method, to ensure, when the abstract method is called in this particular implementation, that one or more protected methods are called. Something like this ...
01.public abstract class MyBaseClass02.{03. protected void Foo(){ /* stuff */ }04. protected void Bar(){ /* stuff */ }05. 06. public abstract void Stuff();07.}08. 09.public class MyClass : MyBaseClass10.{11. public override void Stuff()12. {13. Bar();14. }15.}
In this trivial example I want my test to ensure that Bar() is called.
Can I actually do this?