C# Class CcNet.Labeller.Tests.Specification

Provides a base implementation for Arrange-Act-Assert testing.
All test setup should take place in the Arrange() method; the object being tested should be exercised in the Act() method; assertions are made in the [Test] methods. Any test cleanup takes place in the After() method.
Datei anzeigen Open project: neutmute/SvnRevisionLabeller

Protected Properties

Property Type Description
_mockery Rhino.Mocks.MockRepository

Protected Methods

Method Description
Act ( ) : void

Exercise the object under test. Only one object/operation should be tested per class.

To control the potential explosion of classes in Visual Studio's Solution Explorer, it could be beneficial to create an outer class for each object, and then an inner class for each operation.

After ( ) : void

Tidies up after each test. No test should leave artifacts behind which may affect other tests, especially tests which use a persistence store, such as a database.

Arrange ( ) : void

Sets up the context for the tests. Any initialisation of data should take place here.

Private Methods

Method Description
Setup ( ) : void
Teardown ( ) : void

Method Details

Act() protected abstract method

Exercise the object under test. Only one object/operation should be tested per class.
To control the potential explosion of classes in Visual Studio's Solution Explorer, it could be beneficial to create an outer class for each object, and then an inner class for each operation.
protected abstract Act ( ) : void
return void

After() protected method

Tidies up after each test. No test should leave artifacts behind which may affect other tests, especially tests which use a persistence store, such as a database.
protected After ( ) : void
return void

Arrange() protected abstract method

Sets up the context for the tests. Any initialisation of data should take place here.
protected abstract Arrange ( ) : void
return void

Property Details

_mockery protected_oe property

protected MockRepository,Rhino.Mocks _mockery
return Rhino.Mocks.MockRepository