views:

46

answers:

1
A: 

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
Thanks for the reply, it makes sense. I have updated my question based on your help.
blu