johndoe444 1 Posting Whiz in Training

Hi,

This is more generic actually. In nunit tests we want to refer to the original project classes. Now if the test classes are under the project directory as in the original source code then they might import the namespace of the source code through 'using'. But then the problem is that if you compile it into dll to be run from nunit command line then how will the runtime have access to the source code. It will have access to the test classes not the source classes to be tested by the test classes.

The second scenario is that if the test classes are different from the original project and the original project is in the form of dll. Then how do you incorporate it as command line argument for nunit. To understand this thing better let us make some analogy. In the java realm there is a thing called classpath which we can indicate through -cp flag of both java and javac. We can indicate the classes directory of the original source code or the jar (dll equivalent) of the source code while running the junit testrunner class ie

java -cp source.jar junit.testrunner testclass

So I guess there is similar equivalent in c# world.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.