MockRepository mocks = new Rhino.Mocks.MockRepository();
IActiveProgram repository = mocks.CreateMock<IActiveProgram>();
var readPrg = new ReadProgram();
readPrg.init("333", "eee", "", null, repository);
In readPrg.init I will have a several calls on repository object.
For example repository.AddProgram(programName);
How I will be able to know later on exit from readPrg.init to know the arguments that my prerecorded function calls been executed.
Thanks for help.
You’d call
repository.AssertWasCalled(x => x.AddProgram(programName))after you call init. Look also in the original post of Rhino Mocks AAA syntaxAnother option, you could use Expect: