473,387 Members | 1,493 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.

More NUnit problems.

Here is the situation. I have a DLL that implements needed
functionality. I'll refer to it as Business.dll. It depends on an XML
(it contains config info) file being in the same directory as the DLL.

I then wrote some unit tests for the Business DLL in another DLL (in
another project). I'll refer to this DLL as Test.dll.

So I run Test.dll through NUnit. For reasons I can't understand, the
Business.dll is copied to a temp folder. Obviously the accompanying XML
file is not copied there, so the test always fails.

How can I force the NUnit to execute the test in place, not in some temp
folder?

Thanks.
Nov 16 '05 #1
3 2042
Frank,

Did you read my reply to your previous post about the same problem?

http://groups.google.co.th/groups?hl...oogle%2BSearch

In short, if you use AppDomain.CurrentDomain.BaseDirectory from your
business.dll to retrieve the path to the accompanying XML you should be OK.

Don't know how to force NUnit not to perform shadow copying and I wouldn't
do that. This is just how NUnit works, embrace it.

HTH,
Alexander

"Frank Rizzo" <no**@none.com> wrote in message
news:uE**************@TK2MSFTNGP15.phx.gbl...
Here is the situation. I have a DLL that implements needed functionality.
I'll refer to it as Business.dll. It depends on an XML (it contains
config info) file being in the same directory as the DLL.

I then wrote some unit tests for the Business DLL in another DLL (in
another project). I'll refer to this DLL as Test.dll.

So I run Test.dll through NUnit. For reasons I can't understand, the
Business.dll is copied to a temp folder. Obviously the accompanying XML
file is not copied there, so the test always fails.

How can I force the NUnit to execute the test in place, not in some temp
folder?

Thanks.

Nov 16 '05 #2
Frank Rizzo <no**@none.com> wrote in
news:uE**************@TK2MSFTNGP15.phx.gbl:
Here is the situation. I have a DLL that implements needed
functionality. I'll refer to it as Business.dll. It depends on
an XML (it contains config info) file being in the same
directory as the DLL.

I then wrote some unit tests for the Business DLL in another DLL
(in another project). I'll refer to this DLL as Test.dll.

So I run Test.dll through NUnit. For reasons I can't
understand, the Business.dll is copied to a temp folder.
Obviously the accompanying XML file is not copied there, so the
test always fails.

How can I force the NUnit to execute the test in place, not in
some temp folder?


Frank,

You might get an answer in the NUnit help forum on SourceForge:

http://sourceforge.net/forum/forum.php?forum_id=33694

--
Hope this helps.

Chris.
-------------
C.R. Timmons Consulting, Inc.
http://www.crtimmonsinc.com/
Nov 16 '05 #3
AppDomain.CurrentDomain.BaseDirectory did the trick. Thank you.

Alexander Shirshov wrote:
Frank,

Did you read my reply to your previous post about the same problem?

http://groups.google.co.th/groups?hl...oogle%2BSearch

In short, if you use AppDomain.CurrentDomain.BaseDirectory from your
business.dll to retrieve the path to the accompanying XML you should be OK.

Don't know how to force NUnit not to perform shadow copying and I wouldn't
do that. This is just how NUnit works, embrace it.

HTH,
Alexander

"Frank Rizzo" <no**@none.com> wrote in message
news:uE**************@TK2MSFTNGP15.phx.gbl...
Here is the situation. I have a DLL that implements needed functionality.
I'll refer to it as Business.dll. It depends on an XML (it contains
config info) file being in the same directory as the DLL.

I then wrote some unit tests for the Business DLL in another DLL (in
another project). I'll refer to this DLL as Test.dll.

So I run Test.dll through NUnit. For reasons I can't understand, the
Business.dll is copied to a temp folder. Obviously the accompanying XML
file is not copied there, so the test always fails.

How can I force the NUnit to execute the test in place, not in some temp
folder?

Thanks.


Nov 16 '05 #4

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

Similar topics

6
by: Peter Rilling | last post by:
My development team is using VS.NET with VSS integration. They are able to check in and out from within VS.NET. We also use NUnit for testing our libraries. Currently our entire solution is...
3
by: geoffblanduk_nospam | last post by:
Hopefully this will be of use to your all, an NUnit Documentation Utility. This takes the results of your NUnit tests and produces an HTML report (it's pretty colours so useful for showing to...
0
by: W. Schwenkner | last post by:
I use the NUnit VS addin intensivly in development C# projects. Now I have to write a project in managed C++ and I have problems with the NUnit addin. First, the Addin extends the context menu...
0
by: fishball79 | last post by:
Hi all, I'm encountering a weird problem. I am attempting to run NUnit tests on web services (developed on .net framework 1.1) hosted on a seperate machine on the intranet. I can access the...
3
by: JJ | last post by:
Hi, In Nunit testing with asp.net are you guys creating a separate Test assembly for testing or integrating right in class themselves? Is anyone using a third party Unit Test addon for Nunit to...
0
by: Ray Tayek | last post by:
hi, getting a: .\Stdafx.cpp : fatal error C1192: #using failed on 'i: nunit\samples\cpp-sample"' 'The filename, directory name, or volume label syntax is incorrect.' nunit is installed in...
6
by: Ray Tayek | last post by:
hi, i am preparing to teach a class in c++ and would like to intoduce some unit testing. i can make unit tests in c# using this dll and nant from the command line. i am using visual c++ 2005...
20
by: Parag | last post by:
Hi, I am trying to figure out best testing tool for my project. I have narrowed down my requirements to two tools NUNIT and VSTS unit. But I have used neither and I have to use only one of them....
2
by: JohnGoogle | last post by:
Hi, I'm a newbie so sorry if there is a simple answer to this! I'm using C# in Visual Studio Express at the moment. I've downloaded NUnit v 2.2.8 and can load and run the tests they supply...
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: 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
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.