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

Can't get Unit Test to work with some projects

I'm having trouble creating unit tests for some of the projects in my
solution. The unit test doesn't seem to recognize that there are classes and
methods in some of the projects in a solution and so does not give me the
opportunity to ask it to create unit tests for those project classes and
members. What's the trick?

--
Richard Lewis Haggard
General: www.Haggard-And-Associates.com
Please come visit here for a couple thousand good giggles!:
www.haggard-and-associates.com/Humor/humor.htm
Aug 22 '07 #1
1 1110


In VS2005, classes default to

class MyClass
{

void MyMethod()
{
}

}
which means they are not available to outside assemblies.
You have to make sure you add "public" (most common) to your def

public class MyClass
{

public void MyMethod()
{
}

}


That's one guess.


"Richard Lewis Haggard" <HaggardAtWorldDotStdDotComwrote in message
news:OD****************@TK2MSFTNGP05.phx.gbl...
I'm having trouble creating unit tests for some of the projects in my
solution. The unit test doesn't seem to recognize that there are classes
and methods in some of the projects in a solution and so does not give me
the opportunity to ask it to create unit tests for those project classes
and members. What's the trick?

--
Richard Lewis Haggard
General: www.Haggard-And-Associates.com
Please come visit here for a couple thousand good giggles!:
www.haggard-and-associates.com/Humor/humor.htm


Aug 22 '07 #2

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

Similar topics

0
by: Olav | last post by:
Hi, ive just started on a relatively large project - 100+ projects and assemblies. I find I spend a lot of time adding namespaces and references, etc to my projects. Typically there is a class I...
3
by: | last post by:
I am working on a web/webservice application that has a service layer. Most service methods will perform an access-check before executing. This check uses the IPrincipal credentials available in...
11
by: D. Yates | last post by:
Hi, In an effort to improve my own code and try to teach others that I work with that unit testing IS MANDATORY. I'm interested in examples of unit testing that other people are using. How...
15
by: Enrique | last post by:
Question I am posting this question again (3rd time) because some issues with my no spam alias. Here it is the question: I have not been able to run unit tests for a VSTO (2005) project. I...
72
by: Jacob | last post by:
I have compiled a set og unit testing recommendations based on my own experience on the concept. Feedback and suggestions for improvements are appreciated: ...
48
by: Ark Khasin | last post by:
Unit testing is an integral component of both "formal" and "agile" models of development. Alas, it involves a significant amount of tedious labor. There are test automation tools out there but...
27
by: brad | last post by:
Does anyone else feel that unittesting is too much work? Not in general, just the official unittest module for small to medium sized projects? It seems easier to write some quick methods that are...
2
by: =?Utf-8?B?c2lwcHl1Y29ubg==?= | last post by:
I was wonder if there is any protocol or suggestions on how to setup unit testing projects in large solution??? If you have a large solution of say 50 projects and add a project for every unit...
4
by: =?Utf-8?B?c2lwcHl1Y29ubg==?= | last post by:
Hi I am familiar with unit testing but have to implement in a large solution of 100 projects - my concern is Adding Unit test will bloat the solution - taking more time to get all code from...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...

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.