Test Specification Generation

Prerequisites
  • Supported testing framework installed.
  • Remove previous version prior to installation.

Example use
testdocs -f "c:\Development\Triangle\TriangleTests.dll"

Test Specifications
Below is the output created from the test class in Appendix A.
Test Specification Generator V0.01

Test Specs:

Validating Triangle
        When Checking Length Of Sides    
                 Should Accept Equalateral Triangle
                 Should Not Allow Side1 Break Sum Of Sides
                 Should Not Allow Side2 Break Sum Of Sides Rule
From this we can see the tests are not complete because we have not tested all sides conform to the sum of sides rule.

Appendix A - Test class

namespace ValidatingTriangle
{
    public class WhenCheckingLengthOfSides
    {
        public void ShouldAcceptEqualateralTriangle()
        {
            IPolygon triangle = new Triangle(10, 10, 10);

            bool isTriangle = triangle.IsValid();

            Assert.That(isTriangle, "Valid triangle");
        }

        public void ShouldNotAllowSide1BreakSumOfSides()
        {
            IPolygon triangle = new Triangle(20, 10, 10);

            bool isTriangle = triangle.IsValid();

            Assert.That(isTriangle.Equals(false), "Sum of sides");
        }

        public void ShouldNotAllowSide2BreakSumOfSidesRule()
        {
            IPolygon triangle = new Triangle(10, 20, 10);

            bool isTriangle = triangle.IsValid();

            Assert.That(isTriangle.Equals(false), "Sum of sides");
        }
}

Last edited Dec 21, 2009 at 3:42 PM by djnz_gea, version 23

Comments

No comments yet.