473,410 Members | 1,930 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,410 software developers and data experts.

Class Implementation

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
Jul 21 '05 #1
1 2171
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
-----Original Message-----
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 numberof 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, ByValKeyValue As Object) As Boolean
'ColCty procedure
'TODO: Returns a Boolean value indicating whethera 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
.

Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: Mon | last post by:
I am in the process of reorganizing my code and came across and I came across a problem, as described in the subject line of this posting. I have many classes that have instances of other classes...
4
by: Malkocoglu | last post by:
In the good old days , i had a class that had 30 functions (let's say) There was a single include(*.H) file and i could have several implementation(*.CPP) files The reason for doing this is to...
4
by: d0wsdkn02 | last post by:
I need some architecture help. Our app is similar between clients, but every client has specific needs that can require us to change anything. I'll concentrate on one class below, but potentially...
4
by: Ray Dukes | last post by:
What I am looking to do is map the implementation of interface properties and functions to an inherited method of the base class. Please see below. ...
8
by: Gregory | last post by:
I have a question about using STL containers in C++ class public interface. Lets say that I want to return some container from class method or accept class method parameter as some container. For...
7
by: ankitjain.bvcoe | last post by:
Hi i have the following problem in my design :::: i want to define an abstract class LogBuffer and derive two singleton classes from it i.e AlarmBuffer and FireWallBuffer.For this my design is...
2
by: Jessica | last post by:
I have a base class and a derived class, but I am getting errors when I try to access functions of the derived class. Simplified version of my code is as follows: //////////////// // test2.hh...
7
by: =?iso-8859-1?Q?S=F8ren_M._Olesen?= | last post by:
Hi How do I pass a complex type to a webservice?? What I have is a Class 'MyComplexClass' which lives in it's own dll/namespace. I'd like to pass this class to my webmethod: <WebMethod()_...
9
by: Steve Richter | last post by:
in a generic class, can I code the class so that I can call a static method of the generic class T? In the ConvertFrom method of the generic TypeConvert class I want to write, I have a call to...
52
by: Ben Voigt [C++ MVP] | last post by:
I get C:\Programming\LTM\devtools\UselessJunkForDissassembly\Class1.cs(360,27): error CS0535: 'UselessJunkForDissassembly.InvocableInternals' does not implement interface member...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.