I'm trying to give the new AAA syntax a go.

One thing that I can't seem to get working is asserting that a
property get/set was called.

I am using a Stub so I can simply check the value of the property at
the end of the test, but I believe I should be able to assert that a
property get and property set methods were called right?

For example:

' Set the property
viewStub.ProjectId = 810100
' Assert that the property was set
viewStub..AssertWasCalled(Sub(x)
                                         x.ProjectId = 810100
                                     End Sub)

That causes the following exception:
Rhino.Mocks.Exceptions.ExpectationViolationException:
ICorporateExperienceBaseControlView.set_ProjectId(810100); Expected
#1, Actual #0.


Likewise if I try to assert that the property was read with this:

Dim a As Integer = viewStub.ProjectId
viewStub.AssertWasCalled(Function(x) x.ProjectId)

I get this exception:
Rhino.Mocks.Exceptions.ExpectationViolationException:
ICorporateExperienceBaseControlView.get_ProjectId(); Expected #1,
Actual #0.

Can anyone tell me what I'm doing wrong?

-- 
You received this message because you are subscribed to the Google Groups 
"Rhino.Mocks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rhinomocks?hl=en.

Reply via email to