Fluent syntax is broken

Description
The fluent syntax is implemented with a base test class that wraps the SUT. It simplifies the SUT setup and reduces duplication by defining an implicit context.

It relies on the test class to be created before running each test method. Otherwise the method Setup() should be called from each test method or from the test setup.

Observed
MS Silverlight Unit Test Framework

Solution

Scenario: Overriding Setup

[TestInitialize]
public override void Setup() { base.Setup(); }

Scenario: Calling from Initialize

[TestInitialize]
public void TestInitialize() { Setup(); }

Scenario: Calling from test method

[TestMethod]
public void TestMethod() {
Setup();
_// test body_
}

Last edited Jan 20, 2009 at 2:50 AM by mikemps, version 4

Comments

No comments yet.