I need some assistance with writing a unit test for the following class using Rhino Mocks 3.5. The following overrided method in my class:
public override void Initialize(params object[] messages)
{
var data = new ViewData
{
Name = this.GetName()
};
this.Notify(data);
}
I want to be write a test to validate that when the Initialize method is called, the method calls the Notify method and has a parameter of type ViewData. Also I want to check that the GetName method which is a private method is called within this method. I use an accessor to access the GetName private method.
Any help would be great with this as I am new to writing tests and need assistance.
Notify()
does? Does it access somehow any other classes which injected inthis
class? – sll