SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 46 | Next

Jonathan Jacky, Margus Veanes, Colin Campbell, Wolfram Schulte

"Model-Based Software Testing and Analysis with C#"

This creates another library that contains
your tests.
csc /target:library /reference:Client.dll,Server.dll,Temperature.dll ?†
/reference:"%PROGRAMFILES%\NUnit-Net-2.0 2.2.8\bin\nunit.framework.dll" ?†
Tests.cs
To execute the tests, run one of the NUnit test runner applications, identifying
your test library on the command line or in the GUI. This command runs the command
line test runner.
nunit-console /include=Convert Tests.dll
The test results appear on the console:
Included categories: Convert
..F
Tests run: 2, Failures: 1, Not run: 0, Time: 0.501 seconds
Failures:
1) ClientServerImpl.Tests.ConvertMany :
expected: <100>
but was: <101>
at ClientServerImpl.Tests.ConvertMany()
This report says two tests were run and one failed, and provides some information
about the failure. In the next section we will take a closer look at those tests.
2.7 Some simple scenarios
Our Tests class includes two test methods, Convert and ConvertMany, for testing
the ConvertToCelsius method in our Temperature class (Figure 2.9). NUnit test
26 Why We Need Model-Based Testing
methods must be public void methods with no parameters, and must be labeled
with the [Test] attribute. We have also labeled these with the optional [Category("
Convert")] attribute so we can command the test runner to run just these
tests.
Each test method tests a run, a sample of program behavior consisting of a
sequence of method calls and other statements.


Pages:
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6