Monday, January 4, 2010

Accessing the System Under Test with fitSharp

FitNesse Java Slim has a new feature in the latest release for directly accessing methods on the system under test. fitSharp has had an equivalent feature for a while, courtesy of the old FitLibrary .NET code base. We simply implement the DomainAdapter interface on our Slim fixture.

using fitSharp.Machine.Model; namespace fitSharp.Samples { public class SampleSlimFixture : DomainAdapter { private readonly SampleDomain systemUnderTest = new SampleDomain(); public object SystemUnderTest { get { return systemUnderTest; } } public void SomeFixtureMethod() {...} } public class SampleDomain { public void SomeMethod() {...} } }
Now we can invoke methods on the fixture and the SUT class from a Slim table.


No comments:

Post a Comment