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

Unit Testing mixed assemblies

I have a dll assembly compiler with the /clr flag as it contains ref classes
and traditional style C++ classes.

I want to write unit tests for the ref classes in that assembly. VS2005
allows me to author such a test, but at runtime I get the following exception

Test method TestProject2.MPersistTest.GetFiveTest threw exception:
System.IO.FileNotFoundException: The specified module could not be found.
(Exception from HRESULT: 0x8007007E).

MSDN has the following statements:

Mixed. A mixed project is a project that uses the /clr compiler option. If
your production code is mixed, and not an executable file, any callable
method in your code can be called and tested.

Production code project. If your production code is written in Visual C++,
you can generate unit tests only if your product uses the /clr:safe compiler
option.

On the same page which appear to be contradictory.

The assembly in question has been strongly signed (well delay signed) and
installed in the GAC, yet the test framework is still having problems with it.

Does nay one know:
1) Whether I can actually get the unit test functionality working with mixed
assemblies
2) If so, what is the matter with this one?

Thanks

Colin
Jan 4 '06 #1
1 2188
"Colin Desmond" <Co**********@discussions.microsoft.com> wrote
I have a dll assembly compiler with the /clr flag as it contains ref
classes
and traditional style C++ classes.

I want to write unit tests for the ref classes in that assembly. VS2005
allows me to author such a test, but at runtime I get the following
exception

Test method TestProject2.MPersistTest.GetFiveTest threw exception:
System.IO.FileNotFoundException: The specified module could not be found.
(Exception from HRESULT: 0x8007007E).
This might be due to a missing manifest (/clr implies /MD). Can you
debug the test project?
Enable NT LDR output to determine the error (use gflags or just set
*(char*){,,ntdll.dll}_ShowSnaps=1 before the library is loaded)
Does nay one know:
1) Whether I can actually get the unit test functionality working with
mixed
assemblies


I'm fairly certain you can. I guess, the restriction is about generating
a test skeleton only.

-hg
Jan 5 '06 #2

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

Similar topics

2
by: Tim Haughton | last post by:
The upcoming version of Visual Studio has in built testing functionality, or so I read. Does anyone know if this is support for the industry standard unit testing framework (NUnit) or has the NIH...
1
by: Wayne | last post by:
I am creating a bunch of unit tests for my assemblies, but am running into a problem. Some of my assemblies require values from the .config file. I've not been able to figure out how to add a...
6
by: Droopy | last post by:
Hi, I want to add unit tests in my application using NUnit. At first, I thought to add unit tests in the class that is tested, enclosed in a conditional attribute to remove these unit tests from...
9
by: Edward Diener | last post by:
I received no answers about this the first time I posted, so I will try again. My inability to decipher an MSDN topic may find others who have the same inability and someone who can decipher and...
8
by: Bern McCarty | last post by:
Is it at all possible to leverage mixed-mode assemblies from AppDomains other than the default AppDomain? Is there any means at all of doing this? Mixed-mode is incredibly convenient, but if I...
2
by: jd1978 | last post by:
I don't have Team System, but I'd like to be able to unit test the code in my app_code directory using nunit, or something else. Is there any way to do this? I can't add a reference from another...
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: ...
8
by: Edward Diener | last post by:
By reuse, I mean a function in an assembly which is called in another assembly. By a mixed-mode function I mean a function whose signature has one or more CLR types and one or more non-CLR...
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: 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:
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: 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...

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.