You could assert that the setter
on the Bars
property has been called with a correct argument. Assuming the Bars
property is an array of strings:
// arrange
var view = MockRepository.GenerateMock<IFooView>();
var bars = new[] { "bars" };
// act
view.Bars = bars;
// assert
view.AssertWasCalled(
x => { x.Bars = bars; }
);
This should also work:
view.AssertWasCalled(
x => { x.Bars = new[] { "abc" }; }
);
Darin Dimitrov
2010-03-03 16:46:17