Class Implementation

  • Thread starter Thread starter Rodney
  • Start date Start date
R

Rodney

Hi all,

Can someone please show me how to unit test this class
listed below:


Public MustInherit Class DataCollectionBase
Implements IEnumerable, IEnumerator
Protected m_dv As DataView
Protected m_iCursor As Integer
Public ReadOnly Property Count() As Integer
Get
'TODO: Return a Count
'Master-Detail Navigating
End Get
End Property
Public Property Sort() As String
Get
'TODO: Gets the sort string for the
underlying DataView. Uses the same syntax as the
System.Data.DataView class
End Get
Set(ByVal Value As String)
'TODO: Sets the sort string for the
underlying DataView.
End Set
End Property

Public Function GetEnumerator() As
System.Collections.IEnumerator Implements
System.Collections.IEnumerable.GetEnumerator
'Returns an object implementing the IEnumerator
interface.
End Function

Protected ReadOnly Property Current() As Object
Implements System.Collections.IEnumerator.Current
Get
'TODO: MustInherit method to retrieve the
current object in the collection for the For Each
construct.
End Get
End Property

Public Function MoveNext() As Boolean Implements
System.Collections.IEnumerator.MoveNext
'TODO: If m_iCursor is less than the total number
of items in the collection, this function increments
m_iCursor and returns True. Otherwise, False is returned.
End Function

Public Sub Reset() Implements
System.Collections.IEnumerator.Reset
'TODO: Reinitializes m_iCursor.
End Sub
Public Sub Clear()
'ColCty procedure
'TODO: Clears the table underlying the internal
DataView object.
End Sub
Public Function Exists(ByVal KeyName As String, ByVal
KeyValue As Object) As Boolean
'ColCty procedure
'TODO: Returns a Boolean value indicating whether
a particular item exists in the internal DataView.
End Function
Public Sub Remove(ByVal KeyName As String, ByVal
KeyValue As Object)
'ColCty procedure
'TODO: Removes an item from the DataTable
underlying the internal DataView.
End Sub

End Class



Thanks in advance,
Rodney
 
Alright, let me start with a simpler question. This was
given to me in an Implementation Spec and I'm not sure
how to implement it. I know there's a User Collection
class that inherits it, as well as an Address Collection
class.

Can someone explain to me what this class might be for?
Also, is anyone available on Messenger to chat with me
about this class? Just whenever is a good time for me.

Thanks for any help in advance,
Rodney
 
Back
Top