TypeMockException occurred in Typemock.dll using Version8.6

0 votes
Hi Team,
We are upgrading Typemock from version 8.4 to version 8.6(TypemockIsolatorSuite-  I got an exception in one of the test, 
Please find the following code snippet simplifies and illustrates the issue
Sample VB.Net Code
Public Enum StateChange
    BySystem = 0
End Enum
Public Class Class1
    Private Sub Method1(ByRef ShowNormal As Boolean, Optional ByRef StateEditType As StateChange = -1)
    End Sub
    Public Sub Test()
    End Sub
End Class
Typemock UnitTest Code
Private target As New SampleAppn.Class1
<TestMethod()> _
    Public Sub Test()
        Dim bShowNormal As Boolean = False
        Dim mock As Mock = MockManager.MockAll(GetType(SampleAppn.Class1))
        mock.ExpectCall("Method1", 1).Args(New Assign(bShowNormal), New Assign(-1))
    End Sub
In the above code, the second parameter I am passing is of enum type, am actually passing integer value causing exception
The same code is working fine in TypeMock Version 8.4. Please help us to resolve in Typemock 8.6 Version. 
asked Oct 9, 2017 by satanova81 (280 points)
reshown Oct 11, 2017 by satanova81
Can i have any update on this?

1 Answer

0 votes

Hey Satanova,

Thank you for your question.

Please see the answer on the following link:


Cheers, Sapir.

answered Oct 15, 2017 by SapirTypemock (1,730 points)