Package fitnesse.wiki

Examples of fitnesse.wiki.WikiPage


  }

  @Test
  public void testRunnerCSharp() throws Exception {
    String specifiedPageText = "!define TEST_RUNNER {..\\fitnesse\\fitsharp\\Runner.exe}";
    WikiPage specifiedPage = makeTestPage(specifiedPageText);
    WikiPageDescriptor descriptor = new WikiPageDescriptor(specifiedPage, false, false, "");
    MockClientBuilder clientBuilder = new MockClientBuilder(descriptor);
    assertEquals("..\\fitnesse\\fitsharp\\Runner.exe", clientBuilder.getTestRunner());
  }
View Full Code Here


  }

  @Test
  public void testRunnerCSharpWithDebug() throws Exception {
    String specifiedPageText = "!define TEST_RUNNER {..\\fitnesse\\fitsharp\\Runner.exe}";
    WikiPage specifiedPage = makeTestPage(specifiedPageText);
    WikiPageDescriptor descriptor = new WikiPageDescriptor(specifiedPage, false, true, "");
    MockClientBuilder clientBuilder = new MockClientBuilder(descriptor);
    assertEquals("..\\fitnesse\\fitsharp\\runnerw.exe", clientBuilder.getTestRunner());
  }
View Full Code Here

  }

  @Test
  public void testRunnerDefault() throws Exception {
    String pageText = "!define TEST_SYSTEM {slim}\n";
    WikiPage page = makeTestPage(pageText);
    WikiPageDescriptor descriptor = new WikiPageDescriptor(page, false, false, "");
    MockClientBuilder clientBuilder = new MockClientBuilder(descriptor);
    assertEquals(MOCK_TEST_RUNNER, clientBuilder.getTestRunner());
  }
View Full Code Here

  }

  @Test
  public void testRunnerDefaultWithDebug() throws Exception {
    String pageText = "!define TEST_SYSTEM {slim}\n";
    WikiPage page = makeTestPage(pageText);
    WikiPageDescriptor descriptor = new WikiPageDescriptor(page, false, true, "");
    MockClientBuilder clientBuilder = new MockClientBuilder(descriptor);
    assertEquals(MOCK_TEST_RUNNER, clientBuilder.getTestRunner());
  }
View Full Code Here

  }

  @Test
  public void testCustomRunner() {
    String specifiedPageText = "!define REMOTE_DEBUG_RUNNER {Different runner}";
    WikiPage specifiedPage = makeTestPage(specifiedPageText);
    WikiPageDescriptor descriptor = new WikiPageDescriptor(specifiedPage, false, true, "");
    MockClientBuilder clientBuilder = new MockClientBuilder(descriptor);
    assertEquals("Different runner", clientBuilder.getTestRunner());
  }
View Full Code Here

  @Test
  public void testTestRunnerWithRootPathVariable() throws Exception {
    String fitnesseRootpath = System.getProperty("user.home");
    String specifiedPageText = "!define TEST_RUNNER (${user.home}/rubyslim.rb)\n";
    WikiPage specifiedPage = makeTestPage(specifiedPageText);
    WikiPageDescriptor descriptor = new WikiPageDescriptor(specifiedPage, false, false, "");
    MockClientBuilder clientBuilder = new MockClientBuilder(descriptor);
    assertEquals(fitnesseRootpath + "/rubyslim.rb", clientBuilder.getTestRunner());
  }
View Full Code Here

  }

  @Test
  public void testCommandPatternCSharpWithSuiteConfig() throws Exception {
    String specifiedPageText = "!define COMMAND_PATTERN {%m -r fitSharp.Slim.Service.Runner,fitsharp.dll -c \"c:\\program files\\suite.config\" %p}\n";
    WikiPage specifiedPage = makeTestPage(specifiedPageText);
    WikiPageDescriptor descriptor = new WikiPageDescriptor(specifiedPage, false, false, "");
    MockClientBuilder clientBuilder = new MockClientBuilder(descriptor);
    assertTrue(Arrays.asList(clientBuilder.getCommandPattern()).contains("c:\\program files\\suite.config"));

  }
View Full Code Here

    assertTrue(Arrays.asList(clientBuilder.getCommandPattern()).contains("c:\\program files\\suite.config"));

  }

  private WikiPage makeTestPage(String pageText) {
    WikiPage root = InMemoryPage.makeRoot("RooT");
    return WikiPageUtil.addPage(root, PathParser.parse("TestPage"), pageText);
  }
View Full Code Here

        assertTranslatesVariable("${z}", "<span class=\"meta\">undefined variable: z</span>");
        assertTranslatesVariable("${}", "${}");
    }

    private void assertTranslatesVariable(String variable, String expected) throws Exception {
        WikiPage pageOne = new TestRoot().makePage("PageOne", "!define x {y}\n" + variable);
        ParserTestHelper.assertTranslatesTo(pageOne,
          "<span class=\"meta\">variable defined: x=y</span>" + HtmlElement.endl +
            ParserTestHelper.newLineRendered + expected);
    }
View Full Code Here

          "<span class=\"meta\">variable defined: x=y</span>" + HtmlElement.endl +
            ParserTestHelper.newLineRendered + expected);
    }

    @Test public void translatesVariableContents() throws Exception {
        WikiPage pageOne = new TestRoot().makePage("PageOne", "!define x {''y''}\n|${x}|\n");
        String result = ParserTestHelper.translateTo(pageOne);
        assertTrue(result.contains("<i>y</i>"));
    }
View Full Code Here

TOP

Related Classes of fitnesse.wiki.WikiPage

Copyright © 2018 www.massapicom. 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.