G
Guest
I have some simple (private) types...
Friend Enum Types
Value1
Value2
End Enum
Friend Structure Detail
Dim Type As Types
End Structure
Friend Class Parser
Friend Function GetDetail() As Detail
Dim _Detail As New Detail
_Detail.Type = Types.Value2
Return _Detail
End Function
End Class
I hope to test the Parser.GetDetail method with the following test but I
can't see how to set the _ExpectedDetail.Type...
<TestClass()> Public Class ParserTest
<TestMethod()> Public Sub GetDetailTest()
Dim _Parser As ClassLibrary1_ParserAccessor = New
ClassLibrary1_ParserAccessor(ClassLibrary1_ParserAccessor.CreatePrivate)
Dim _ExpectedDetail As ClassLibrary1_DetailAccessor = New
ClassLibrary1_DetailAccessor(ClassLibrary1_DetailAccessor.CreatePrivate)
'_ExpectedDetail.Type = ClassLibrary1_TypesAccessor.Value2
'_ExpectedDetail.Type = New
ClassLibrary1_TypesAccessor(ClassLibrary1_TypesAccessor.Value2)
'_ExpectedDetail.Type = ???
Dim _ActualDetail As ClassLibrary1_DetailAccessor = _Parser.GetDetail
Assert.AreEqual(_ExpectedDetail.Type, _ActualDetail.Type)
End Sub
End Class
Friend Enum Types
Value1
Value2
End Enum
Friend Structure Detail
Dim Type As Types
End Structure
Friend Class Parser
Friend Function GetDetail() As Detail
Dim _Detail As New Detail
_Detail.Type = Types.Value2
Return _Detail
End Function
End Class
I hope to test the Parser.GetDetail method with the following test but I
can't see how to set the _ExpectedDetail.Type...
<TestClass()> Public Class ParserTest
<TestMethod()> Public Sub GetDetailTest()
Dim _Parser As ClassLibrary1_ParserAccessor = New
ClassLibrary1_ParserAccessor(ClassLibrary1_ParserAccessor.CreatePrivate)
Dim _ExpectedDetail As ClassLibrary1_DetailAccessor = New
ClassLibrary1_DetailAccessor(ClassLibrary1_DetailAccessor.CreatePrivate)
'_ExpectedDetail.Type = ClassLibrary1_TypesAccessor.Value2
'_ExpectedDetail.Type = New
ClassLibrary1_TypesAccessor(ClassLibrary1_TypesAccessor.Value2)
'_ExpectedDetail.Type = ???
Dim _ActualDetail As ClassLibrary1_DetailAccessor = _Parser.GetDetail
Assert.AreEqual(_ExpectedDetail.Type, _ActualDetail.Type)
End Sub
End Class