-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
40 lines (31 loc) · 1.61 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
A replacement for MSTest when using the unit-testingless Visual Studio 2010 Express
Use like this:
In your files, you'll need to maintain two project files (And two solutions...)
MySolution.sln MySolutionExpress.sln
| | | |
| SomeProject |
| | |
TestProject.csproj | TestProjectExpress.csproj
| | |
| <src> |
| |
\ /
\ /
\______________________/
|
<test src>
It's perfectly ok to have these solution and project files sitting alongside each
other in the same directories. The only headache is that you need to remember to
change both of them if you change one.
In the XXExpress.csproj project files, you need to define some preprocessor directive,
e.g. EXPRESS2010. Then, in the code, where you would normally reference MSTest, you
must do this:
#if(EXPRESS2010)
using ExpressTest.UnitTesting;
#else
using Microsoft.VisualStudio.TestTools.UnitTesting;
#endif
Note that you can't have private accessor references in your test project any more,
so you need to do per-function/property accessor code, guarded by #if(DEBUG) blocks.
It's not the prettiest, but you get to use MSTest in an IDE and still allow
people with VS2010 Express to contribute to your code. Yay.