C#, .NET, and Unit Testing

G

grasp06110

Hi Everybody,

I am in an unfortunate situation where I need to work on a C# project
for a while. We are using Visual Studio 2005. The code I need to
work on is a C# desktop application with no unit testing what so
ever.

Is there anyone out there that has made this transition? What are the
best bits of advice you can offer someone who is going through it?

Specifically, what tools would you recommend for Unit Testing? For an
IDE? Am I hopelessly tied to what every my company is willing to pay
for wrt what IDE I use? I miss Eclipse more than words can tell.
Just goes to show you don't appreciate water until your well runs dry
(at least that's what I learned from Etta James).

Thanks,
John
 
A

Arved Sandstrom

grasp06110 said:
Hi Everybody,

I am in an unfortunate situation where I need to work on a C# project
for a while. We are using Visual Studio 2005. The code I need to
work on is a C# desktop application with no unit testing what so
ever.

Is there anyone out there that has made this transition? What are the
best bits of advice you can offer someone who is going through it?

Specifically, what tools would you recommend for Unit Testing? For an
IDE? Am I hopelessly tied to what every my company is willing to pay
for wrt what IDE I use? I miss Eclipse more than words can tell.
Just goes to show you don't appreciate water until your well runs dry
(at least that's what I learned from Etta James).

Thanks,
John

I don't call it an unfortunate situation when I "have to" work on C#.
It's at least as good as Java, certainly not worse, and anyway all of us
are professional developers, not dilettantes who get to pick what
language we use.

I've used Visual Studio Web Developer or Visual C# as IDEs. These are
excellent IDEs, and you won't be suffering through the same kind of
glitches as you get with Eclipse. As for testing, I've used NUnit, works
just fine.

If you don't like Visual Studio 2005, exactly how tough is it to Google
just a bit and find all the Visual X 2008 Express IDEs?

AHS
 
A

Arne Vajhøj

I am in an unfortunate situation where I need to work on a C# project
for a while. We are using Visual Studio 2005. The code I need to
work on is a C# desktop application with no unit testing what so
ever.

Is there anyone out there that has made this transition? What are the
best bits of advice you can offer someone who is going through it?

Specifically, what tools would you recommend for Unit Testing? For an
IDE? Am I hopelessly tied to what every my company is willing to pay
for wrt what IDE I use? I miss Eclipse more than words can tell.

Possible IDE's:
- Visual Studio (Express Edition is free, the rest cost money)
- SharpDevelop (open source, I like it !)
- Eclipse with Emonic C# plugin

Unit testing:
- the one that comes with the expensive versions of VS
- NUunit which is a relative direct port of JUnit

Other tools that may make you feel at home:
- log4net
- nant

Arne
 
A

Arne Vajhøj

If you don't like Visual Studio 2005, exactly how tough is it to Google
just a bit and find all the Visual X 2008 Express IDEs?

2010 has been out for approx. a month now.

Arne
 
M

Mike Schilling

Arved said:
I don't call it an unfortunate situation when I "have to" work on C#.
It's at least as good as Java, certainly not worse, and anyway all of
us are professional developers, not dilettantes who get to pick what
language we use.

I've used Visual Studio Web Developer or Visual C# as IDEs. These are
excellent IDEs, and you won't be suffering through the same kind of
glitches as you get with Eclipse. As for testing, I've used NUnit,
works just fine.

Is there only one NUnit now? At the time I needed one (back in 2002 or
so), there were about four at SourceForge. I picked the one that looked
like it had had the most work done on it, and it was fine.
 
M

Mike Schilling

Arne said:
Possible IDE's:
- Visual Studio (Express Edition is free, the rest cost money)
- SharpDevelop (open source, I like it !)
- Eclipse with Emonic C# plugin

Unit testing:
- the one that comes with the expensive versions of VS
- NUunit which is a relative direct port of JUnit

Other tools that may make you feel at home:
- log4net
- nant

ANT also has tasks to build .NET apps. This is very handy for a combined
..NET/Java build.
 
A

Arved Sandstrom

Arne said:
2010 has been out for approx. a month now.

Arne

You're quite right - I hadn't twigged to the fact that the 2010 Express
versions are also now available.

I specifically mentioned the Express versions because the OP noted that
they are still using VS 2005, I'd have to assume the full version. So
from the sounds of it the willingness to pay for anything more recent
isn't there. But IMHO you can get your work done readily enough with the
Express editions.

AHS
 
M

Mike Schilling

Arved said:
You're quite right - I hadn't twigged to the fact that the 2010
Express versions are also now available.

I specifically mentioned the Express versions because the OP noted
that they are still using VS 2005, I'd have to assume the full
version. So from the sounds of it the willingness to pay for anything
more recent isn't there. But IMHO you can get your work done readily
enough with the Express editions.

Version of VS are tied quite heavily to version of .NET. VS 2005
correspsonds to .NET 2.0; if you're using 3.x or anything newer, you'll need
a more recent version of VS.
 
A

Arne Vajhøj

Is there only one NUnit now? At the time I needed one (back in 2002 or
so), there were about four at SourceForge. I picked the one that looked
like it had had the most work done on it, and it was fine.

I have never seen other than http://www.nunit.org/ !

Arne
 
A

Arne Vajhøj

Mike said:
[...]
Version of VS are tied quite heavily to version of .NET. VS 2005
correspsonds to .NET 2.0; if you're using 3.x or anything newer,
you'll need a more recent version of VS.

That's mostly true. However, note that the .NET 3.0 and 3.5 SDKs were
usable with VS2005.

Officially supported?
There is, at least for now, no .NET 4.0 SDK as far as I can tell. So for
.NET 4.0 features, VS2010 is required. It's theoretically possible they
will release a .NET 4.0 SDK though that can be used to enable .NET 4
development in VS2008 (or maybe even VS2005!).

What is needed in the SDK? The compiler comes with the framework!

SharpDevelop, NAnt etc. works with just the framework.

Arne
 
M

Mike Schilling

Arne said:
If it is a combined build and one does not need more
functionality than what it has, then I am sure it
is handy.

Yes. Our build amounted to:

1. Compile the Java classes (and build jars, etc.)
2. Convert the Java to C#
3. Compile the C# into DLLs and EXEs

Being able to do all 3 in ANT (the second was acomplished by running a Java
program, which ANT is also quite good at) was, indeed, handly.
 
M

Mike Schilling

Peter said:
Arne said:
[...]
That's mostly true. However, note that the .NET 3.0 and 3.5 SDKs
were usable with VS2005.

Officially supported?

The 3.0 one was for sure.

3.0 was an odd release, in that it consisted of some new libraries that got
added on to the 2.0 libraries and compiler. 3.5, on the other hand, was a
complete replacement of everything that went before. In a logical world
(i.e. one not run by the marketing department), 3.0 would have been called
2.5 and 3.5 called 3.0 .
 
M

Mike Schilling

Peter said:
I don't disagree with any of that. But the fact remains that SDKs
were provided which enabled users of the older IDE to target the newer
Frameworks.

Provided, as you mentioned, that they didn't need the new language features.
(Of which, in 3.0, there weren't any.)
 
A

Arne Vajhøj

Peter said:
Arne said:
[...]
That's mostly true. However, note that the .NET 3.0 and 3.5 SDKs
were usable with VS2005.

Officially supported?

The 3.0 one was for sure.

3.0 was an odd release, in that it consisted of some new libraries that got
added on to the 2.0 libraries and compiler. 3.5, on the other hand, was a
complete replacement of everything that went before.

3.5 still uses 2.0 CLR.
In a logical world
(i.e. one not run by the marketing department), 3.0 would have been called
2.5 and 3.5 called 3.0 .

More like 2.1 and 2.5 in my opinion. That would lave bump of major
version to new CLR's.

Arne
 
A

Arne Vajhøj

Yes. Our build amounted to:

1. Compile the Java classes (and build jars, etc.)
2. Convert the Java to C#
3. Compile the C# into DLLs and EXEs

Being able to do all 3 in ANT (the second was acomplished by running a Java
program, which ANT is also quite good at) was, indeed, handly.

How do you do the conversion?

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,705
Latest member
Stefkari24

Latest Threads

Top