89
89
public void InvalidFixture()
91
int resultCode = executeConsole( new string[]
92
{ MockAssembly.AssemblyPath, "-fixture:NUnit.Tests.BogusTest" } );
91
int resultCode = executeConsole( new string[] { MockAssembly.AssemblyPath, "-fixture:NUnit.Tests.BogusTest", "-trace:Off" });
93
92
Assert.AreEqual(ConsoleUi.FIXTURE_NOT_FOUND, resultCode);
97
96
public void AssemblyNotFound()
99
int resultCode = executeConsole(new string[] { "badassembly.dll" });
98
int resultCode = executeConsole(new string[] { "badassembly.dll", "-trace:Off" });
100
99
Assert.AreEqual(ConsoleUi.FILE_NOT_FOUND, resultCode);
104
103
public void OneOfTwoAssembliesNotFound()
106
int resultCode = executeConsole(new string[] { GetType().Module.Name, "badassembly.dll" });
105
int resultCode = executeConsole(new string[] { GetType().Module.Name, "badassembly.dll", "-trace:Off" });
107
106
Assert.AreEqual(ConsoleUi.FILE_NOT_FOUND, resultCode);
138
137
public void CanRunWithoutTestDomain()
140
Assert.AreEqual(MockAssembly.ErrorsAndFailures, executeConsole(MockAssembly.AssemblyPath, "-domain:None", "-process:single"));
139
Assert.AreEqual(MockAssembly.ErrorsAndFailures, executeConsole(MockAssembly.AssemblyPath, "-domain:None", "-process:single", "-trace:Off"));
141
140
StringAssert.Contains( failureMsg, output.ToString() );
145
144
public void CanRunWithSingleTestDomain()
147
Assert.AreEqual(MockAssembly.ErrorsAndFailures, executeConsole(MockAssembly.AssemblyPath, "-domain:Single", "-process:single"));
146
Assert.AreEqual(MockAssembly.ErrorsAndFailures, executeConsole(MockAssembly.AssemblyPath, "-domain:Single", "-process:single", "-trace:Off"));
148
147
StringAssert.Contains( failureMsg, output.ToString() );
152
151
public void CanRunWithMultipleTestDomains()
154
Assert.AreEqual(MockAssembly.ErrorsAndFailures, executeConsole(MockAssembly.AssemblyPath, NoNamespaceTestFixture.AssemblyPath, "-domain:Multiple", "-process:single"));
153
Assert.AreEqual(MockAssembly.ErrorsAndFailures, executeConsole(MockAssembly.AssemblyPath, NoNamespaceTestFixture.AssemblyPath, "-domain:Multiple", "-process:single", "-trace:Off"));
155
154
StringAssert.Contains( failureMsg, output.ToString() );
159
158
public void CanRunWithoutTestDomain_NoThread()
161
Assert.AreEqual(MockAssembly.ErrorsAndFailures, executeConsole(MockAssembly.AssemblyPath, "-domain:None", "-nothread", "-process:single"));
160
Assert.AreEqual(MockAssembly.ErrorsAndFailures, executeConsole(MockAssembly.AssemblyPath, "-domain:None", "-nothread", "-process:single", "-trace:Off"));
162
161
StringAssert.Contains( failureMsg, output.ToString() );
166
165
public void CanRunWithSingleTestDomain_NoThread()
168
Assert.AreEqual(MockAssembly.ErrorsAndFailures, executeConsole(MockAssembly.AssemblyPath, "-domain:Single", "-nothread", "-process:single"));
167
Assert.AreEqual(MockAssembly.ErrorsAndFailures, executeConsole(MockAssembly.AssemblyPath, "-domain:Single", "-nothread", "-process:single", "-trace:Off"));
169
168
StringAssert.Contains( failureMsg, output.ToString() );
173
172
public void CanRunWithMultipleTestDomains_NoThread()
175
Assert.AreEqual(MockAssembly.ErrorsAndFailures, executeConsole(MockAssembly.AssemblyPath, NoNamespaceTestFixture.AssemblyPath, "-domain:Multiple", "-nothread", "-process:single"));
174
Assert.AreEqual(MockAssembly.ErrorsAndFailures, executeConsole(MockAssembly.AssemblyPath, NoNamespaceTestFixture.AssemblyPath, "-domain:Multiple", "-nothread", "-process:single", "-trace:Off"));
176
175
StringAssert.Contains( failureMsg, output.ToString() );
179
178
private int runFixture( Type type )
181
return executeConsole( new string[] { AssemblyHelper.GetAssemblyPath(type), "-process:single", "-fixture:" + type.FullName });
180
return executeConsole( new string[] { AssemblyHelper.GetAssemblyPath(type), "-trace:Off", "-process:single", "-fixture:" + type.FullName });
184
183
private int runFixture( Type type, params string[] arguments )
186
string[] args = new string[arguments.Length+3];
185
string[] args = new string[arguments.Length+4];
188
187
args[n++] = AssemblyHelper.GetAssemblyPath(type);
188
args[n++] = "-trace:Off";
189
189
args[n++] = "-process:single";
190
190
args[n++] = "-fixture:" + type.FullName;
191
191
foreach( string arg in arguments )