Examples of doTables()


Examples of fit.Fixture.doTables()

  public void testShouldBeAbleToExecuteEncapsulatedFixture() throws ParseException {
    String fitPage = "<table>" + geDecoratorHTMLRow() + "<tr><td>eg.Division</td></tr>"
      + "<tr><td>numerator</td><td>denominator</td><td>quotient()</td></tr>"
      + "<tr><td>100</td><td>4</td><td>25</td></tr></table>";
    Fixture decorator = new Fixture();
    decorator.doTables(new Parse(fitPage));
    int right = 1 + numberOfAssertionsOnDecorator();
    TestCaseHelper.assertCounts(TestCaseHelper.counts(right, 0, 0, 0), decorator.counts);
  }

  @Test
View Full Code Here

Examples of fit.Fixture.doTables()

  @Test
  public void testShouldBeAbleToFindEncapsulatedFixtureName() throws Exception {
    String fitPage = "<table>" + geDecoratorHTMLRow() + "<tr><td>eg.Division</td></tr></table>";
    Fixture decorator = new Fixture();
    decorator.doTables(new Parse(fitPage));
    String encapsulatedFixtureName = (String) decorator.summary.get(FixtureDecorator.ENCAPSULATED_FIXTURE_NAME);
    assertEquals("eg.Division", encapsulatedFixtureName);
  }

  @Test
View Full Code Here

Examples of fit.Fixture.doTables()

  @Test
  public void testShouldBeAbleToInstantiateEncapsulatedFixture() throws Exception {
    String fitPage = "<table>" + geDecoratorHTMLRow() + "<tr><td>" + TestFixture.class.getName()
      + "</td></tr></table>";
    Fixture decorator = new Fixture();
    decorator.doTables(new Parse(fitPage));
    String encapsulatedFixtureName = (String) decorator.summary.get(FixtureDecorator.ENCAPSULATED_FIXTURE_NAME);
    assertEquals("fit.decorator.TestFixture", encapsulatedFixtureName);
  }

  @Test
View Full Code Here

Examples of fit.Fixture.doTables()

  @Test
  public void testShouldDoNothingIfThereIsNoEncapsulatedFixturePresent() throws Exception {
    String fitPage = "<table>" + geDecoratorHTMLRow() + "</table>";
    Fixture decorator = new Fixture();
    decorator.doTables(new Parse(fitPage));
    assertNull(decorator.summary.get(FixtureDecorator.ENCAPSULATED_FIXTURE_NAME));
    TestCaseHelper.assertCounts(TestCaseHelper.counts(0, 0, 0, 0), decorator.counts);
  }

  @Test
View Full Code Here

Examples of fit.Fixture.doTables()

  @Test
  public void testShouldMarkExceptionIfEncapsulatingFixtureNameIsInvalid() throws Exception {
    String fitPage = "<table>" + geDecoratorHTMLRow() + "<tr><td>invalidClass</td></tr></table>";
    Fixture decorator = new Fixture();
    decorator.doTables(new Parse(fitPage));
    assertEquals(1, decorator.counts.exceptions);
    String encapsulatedFixtureName = (String) decorator.summary.get(FixtureDecorator.ENCAPSULATED_FIXTURE_NAME);
    assertEquals("invalidClass", encapsulatedFixtureName);
  }
View Full Code Here

Examples of fit.Fixture.doTables()

  @Test
  public void testShouldStripFirstRowAndPassRestOfTheTableToEncapsulatedFixture() throws Exception {
    String fitPage = "<table>" + geDecoratorHTMLRow() + "<tr><td>" + TestFixture.class.getName()
      + "</td></tr></table>";
    Fixture decorator = new Fixture();
    decorator.doTables(new Parse(fitPage));
    String expectedTableContents = "<table><tr><td>" + TestFixture.class.getName() + "</td></tr></table>";
    assertEquals(expectedTableContents, decorator.summary.get(TestFixture.TABLE_CONTENTS));
  }

  @Test
View Full Code Here

Examples of fit.Fixture.doTables()

  @Test
  public void testShouldHandleInvalidInputExceptionIfThrownBySetUpMethod() throws Exception {
    String fitPage = "<table>" + geWrongDecoratorHTMLRow() + "<tr><td>" + TestFixture.class.getName()
      + "</td></tr></table>";
    Fixture decorator = new Fixture();
    decorator.doTables(new Parse(fitPage));
    TestCaseHelper.assertCounts(TestCaseHelper.counts(0, 0, 0, 1), decorator.counts);
  }

  @Test
  public void testSetAlternativeArgsShouldStoreOddNumberedColumnsToArgsVariable() throws Exception {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.