473,394 Members | 1,699 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,394 software developers and data experts.

Organizing stubs in a visual studio vb.net solution

I am trying to figure out how to organize a visual studio vb.net
solution to make it possible to execute automated unit tests. I
encounter problems when creating stubs.

When testing an existing system, for which I am not allowed to change
the structure (projects, namespaces and so on) or the implementation
(only correcting faults is allowed), I have the following situation:
-Project "Handlers" -Class "Rodscanner"

Solution "PRS" -Project "PRSFasader" -Class "LoggFasad"

-Project "HandlersTest" -Linked Class "Rodscanner"
-Class "RodscannerTest"
-Class "LoggFasad" (stub)
I want to test the class Rodscanner in namespace WE.PRS.HANDLERS
located in the project Handlers.

The rodscanner class uses the class LoggFasad in namespace
WE.PRS.FASADER located in the project PRSFasader (in the same
solution). The Rodscanner class contains an "imports WE.PRS.FASADER"
statement.

I create another project called HandlersTest. In the HandlersTest
project I link to the file Rodscanner.vb (the class to be tested). I
also create a class called RodscannerTest in the HandlerTest project,
where test cases for the Rodscanner class will be implemented.

Now I need to make a stub for the LoggFasad class to make it possible
to observe and control the LoggFasad class. Is it possible to force the
linked Rodscanner class in the HandlersTest project to use a stub
located in the HandlersTest project instead of the real LoggFasad in
the PRSFasader project?

I do not want to make a copy of the Rodscanner class in the
HandlersTest project, because then I would have to make changes in two
files if I had to correct a fault.

Again, the question is: Is it possible to make the linked Rodscanner
class in the HandlersTest project use the stub LoggFasad so that test
can be run, but make the Rodscanner class in the Handlers project uses
the real LoggFasad class?

If it is not possible in the situation described above, is there
another way of organizing a solution so that it is not necessary to
change between a stub class and the class containing the real
implementation manually?

Nov 30 '05 #1
0 1995

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

Similar topics

1
by: angelag | last post by:
I am currently taking a college course in Visual Basic.Net and I am a beginner. I bought Visual Studio.Net 2003 to do my homework at home. I built my first project and e-mailed it to myself at...
1
by: Andrea | last post by:
Hi All, I am looking for SOM running under WIN32 and Microsoft Visual Studio 6.0. Can anybody help me? Andrea p.s. I apologize for cross-posting, but I have to solve this problem quickly :|
26
by: Bruno Jouhier [MVP] | last post by:
I'm currently experiencing a strange phenomenon: At my Office, Visual Studio takes a very long time to compile our solution (more than 1 minute for the first project). At home, Visual Studio...
0
by: Dan A | last post by:
I have a SOAP written in Java, and being served by Apache Axis - using the wrapped mode. I then used VS 2003 to generate C# client stubs. I have many complex types that are returned - and these...
4
by: Skc | last post by:
We have a developer who has made an application in Visual Studio 2003 and this will not work in our version of Visual Studio 2002. Error message: Solution file loading error: The selected file...
1
by: johnlim20088 | last post by:
Hi, Currently I have 6 web projects located in Visual Source Safe 6.0, as usual, everytime I will open solution file located in my local computer, connected to source safe, then check out/check in...
5
by: OHM \( One Handed Man \) | last post by:
Is it possible to have visual studio add the stubs for you when you implement an interface or inherit from a an abstract class automatically. I know this was a feature in vb.net but I can seem to...
0
jwwicks
by: jwwicks | last post by:
Introduction This tutorial describes how to use Visual Studio to create a new C++ program, compile/run a program, resume work on an existing program and debug a program. It is aimed at the...
3
by: Johnson | last post by:
I'm not sure if this is an IIS 5.1 issue or ASP.NET issue, or Visual Studio 2008 issue -- thus posting to 3 groups. Please don't be offended. The problem I'm encountering is that Visual Studio...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: 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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...

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.