Examples of SlimTestContextImpl


Examples of fitnesse.testsystems.slim.SlimTestContextImpl

    NodeList rows = new NodeList();
    rows.add(tableHeader);
    rows.add(tableRow);
    TableTag tableTag = new TableTag();
    tableTag.setChildren(rows);
      List<Assertion> list = new QueryTable(new HtmlTable(tableTag), "id", new SlimTestContextImpl()).getAssertions();
      return list.get(0);
    }
View Full Code Here

Examples of fitnesse.testsystems.slim.SlimTestContextImpl

  private ScriptTable makeScriptTable(String tableText, boolean localized) throws Exception {
    WikiPageUtil.setPageContents(root, tableText);
    TableScanner ts = new HtmlTableScanner(root.getHtml());
    Table t = ts.getTable(0);
    SlimTestContextImpl testContext = new SlimTestContextImpl();
    if (localized) return new LocalizedScriptTable(t, "id", testContext);
    else return new ScriptTable(t, "id", testContext);
  }
View Full Code Here

Examples of fitnesse.testsystems.slim.SlimTestContextImpl

  private QueryTable makeQueryTable(String tableText) throws Exception {
    WikiPageUtil.setPageContents(root, tableText);
    TableScanner ts = new HtmlTableScanner(root.getHtml());
    Table t = ts.getTable(0);
    testContext = new SlimTestContextImpl();
    return constructQueryTable(t);
  }
View Full Code Here

Examples of fitnesse.testsystems.slim.SlimTestContextImpl



  private static class MockTable extends SlimTable {
    public MockTable() {
      super(null, null, new SlimTestContextImpl());
    }
View Full Code Here

Examples of fitnesse.testsystems.slim.SlimTestContextImpl

    String pageContents = "|" + EXTENSION_NAME + "|" + contents + "|\n";
    WikiPageUtil.setPageContents(root, pageContents);

    TableScanner ts = new HtmlTableScanner(root.getHtml());
    Table t = ts.getTable(0);
    SlimTestContextImpl testContext = new SlimTestContextImpl();
    st = new AutoArgScenarioTable(t, "id", testContext);
    instructions.addAll(st.getAssertions());

    return st;
  }
View Full Code Here

Examples of fitnesse.testsystems.slim.SlimTestContextImpl

        throws Exception {
        WikiPageUtil.setPageContents(root, pageContents);

        TableScanner ts = new HtmlTableScanner(root.getHtml());
        Table t = ts.getTable(0);
      SlimTestContextImpl testContext = new SlimTestContextImpl();
        st = new ScenarioTable(t, "id", testContext);
        instructions.addAll(st.getAssertions());

        return st;
    }
View Full Code Here

Examples of fitnesse.testsystems.slim.SlimTestContextImpl

public class ReturnedValueExpectationTest {
  private SlimTestContextImpl testContext;

  @Before
  public void setup() {
    testContext = new SlimTestContextImpl();
  }
View Full Code Here

Examples of fitnesse.testsystems.slim.SlimTestContextImpl

  }

  @Test
  public void commentTableShouldReturnNull() {
    when(table.getCellContents(0, 0)).thenReturn("comment");
    SlimTable slimTable = slimTableFactory.makeSlimTable(table, "0", new SlimTestContextImpl());
    assertThat(slimTable, nullValue());
  }
View Full Code Here

Examples of fitnesse.testsystems.slim.SlimTestContextImpl

  }

  @Test
  public void tableTypeStartingWithcommentColonShouldReturnNull() {
    when(table.getCellContents(0, 0)).thenReturn("comment: a comment table");
    SlimTable slimTable = slimTableFactory.makeSlimTable(table, "0", new SlimTestContextImpl());
    assertThat(slimTable, nullValue());
  }
View Full Code Here

Examples of fitnesse.testsystems.slim.SlimTestContextImpl

    }
  }

  private void assertThatTableTypeCreateSlimTableType(String tableType, Class<? extends SlimTable> expectedClass) {
    when(table.getCellContents(0, 0)).thenReturn(tableType);
    SlimTable slimTable = slimTableFactory.makeSlimTable(table, "0", new SlimTestContextImpl());
    String message = "should have created a " + expectedClass + " for tabletype: " + tableType
        + " but was " + slimTable.getClass();
    assertThat(message, slimTable, instanceOf(expectedClass));
  }
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.