Guys, thank you for responses,
Here is the test (a separate simple test, has nothing to do with my
real code):
---------------
Imports MbUnit.Framework
Imports Rhino.Mocks

<TestFixture()> _
Public Class AAA_test
    Private TestMock As ITestMock
    Private TestClass As CTestClass

    <SetUp()> _
      Public Sub Setup()
        TestMock = MockRepository.GenerateStub(Of ITestMock)()
        TestClass = New CTestClass
    End Sub


    <Test()> _
    Public Sub DataProviderLoader_Test1()
        TestClass.test(TestMock)
        TestMock.AssertWasCalled(Function(x) Check_Add(x), Function
(options) options.IgnoreArguments.Repeat.Once) ' <<<<<<< Checks for
Repeat.Once
    End Sub


    Private Function Check_Add(ByVal TestMock As ITestMock) As Object
        TestMock.TestSub()
        Return Nothing
    End Function
End Class


Public Class CTestClass
    Public Sub test(ByVal TestMock As ITestMock)
        TestMock.TestSub() ' <<<<<<<<<<<<<<<<<<< Called 2 times
        TestMock.TestSub()
    End Sub
End Class


Public Interface ITestMock
    Sub TestSub()
End Interface
---------------

--~--~---------~--~----~------------~-------~--~----~
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