I am trying to create a Unit Test
<TestMethod> Public Sub TestGetDefaultTypeTransport()
Dim Expected As Integer = 1
With TheseCalls.WillReturn(3)
Dim dummy = Utilities.TypeTransportDefault
End With
Dim Actual As Integer = t.GetTypeDefault
Assert.AreEqual(Expected, Actual)
End Sub
Utilities.TypeTransportDefault is a property that calls my DataAccessLayer. I know this works well so i want to mock it.
when t.GetTypeDefault is invoked, it calls the Utilities.TypeTransportDefault.. in which case I want the value returned to be 3.
but it returns 0.. What is wrong with my code ?
thanks