Re 2
Generally, keep your [test case dll] separate from your [business logic dll]. Your business logic dll shouldn't include any knowledge of NUnit, to separate concerns and simplify deployment/maintenance.
Your test case dll should include a reference to NUnit, and to your business logic dll.
You do not need to share a namespace. You can expose internal members of your business logic dll to your test case dll by modifying the business logic dll's AssemblyInfo.cs file to expose internals to the test case dll. This lets you preserve your desired visibility in the business logic dll.
Re 3
Your test cases should go in a dll (i.e. class library project). You can load this directly into NUnit's UI, or use NUnit's console runner in an integration environment to run your tests automatically.
How I do it:
- open test case class library project
properties, Debug tab
- set to open with external program:
point this to your nunit.exe
- set command line arguments to the
exact name of your test case dll:
MyTests.dll
- working directory: just click the
ellipsis button and it will
pre-select your test dll output
directory for the current build
config
- set the test project to be the
default start project in the
solution; this way, whenever you hit
F5 (or the "Play" button), NUnit will
come right up with your updated tests
preloaded - very convenient and
quick.
Best of luck - also try out the Test project type avl. in Visual Studio, it's very similar to NUnit. I still prefer NUnit but while learning it's good to try some various options.