本文整理汇总了Java中org.apache.hadoop.yarn.webapp.test.WebAppTests.testBlock方法的典型用法代码示例。如果您正苦于以下问题:Java WebAppTests.testBlock方法的具体用法?Java WebAppTests.testBlock怎么用?Java WebAppTests.testBlock使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.hadoop.yarn.webapp.test.WebAppTests
的用法示例。
在下文中一共展示了WebAppTests.testBlock方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testUsual
import org.apache.hadoop.yarn.webapp.test.WebAppTests; //导入方法依赖的package包/类
@Test public void testUsual() {
Injector injector = WebAppTests.testBlock(TestBlock.class);
PrintWriter out = injector.getInstance(PrintWriter.class);
verify(out).print(" id=\"testid\"");
verify(out).print("test note");
}
示例2: testMultilineInfoBlock
import org.apache.hadoop.yarn.webapp.test.WebAppTests; //导入方法依赖的package包/类
@Test(timeout=60000L)
public void testMultilineInfoBlock() throws Exception{
WebAppTests.testBlock(MultilineInfoBlock.class);
TestInfoBlock.pw.flush();
String output = TestInfoBlock.sw.toString().replaceAll(" +", " ");
String expectedMultilineData1 = String.format("<tr class=\"odd\">%n"
+ " <th>%n Multiple_line_value%n </th>%n"
+ " <td>%n This is one line.%n </td>%n");
String expectedMultilineData2 = String.format("<tr class=\"even\">%n"
+ " <th>%n Multiple_line_value%n </th>%n <td>%n <div>%n"
+ " This is first line.%n </div>%n <div>%n"
+ " This is second line.%n </div>%n");
assertTrue(output.contains(expectedMultilineData1) && output.contains(expectedMultilineData2));
}
示例3: testJavaScriptInfoBlock
import org.apache.hadoop.yarn.webapp.test.WebAppTests; //导入方法依赖的package包/类
@Test(timeout=60000L)
public void testJavaScriptInfoBlock() throws Exception{
WebAppTests.testBlock(JavaScriptInfoBlock.class);
TestInfoBlock.pw.flush();
String output = TestInfoBlock.sw.toString();
assertFalse(output.contains("<script>"));
assertTrue(output.contains(JAVASCRIPT_ESCAPED));
}
示例4: testHeaderBlock
import org.apache.hadoop.yarn.webapp.test.WebAppTests; //导入方法依赖的package包/类
@Test public void testHeaderBlock() {
WebAppTests.testBlock(HeaderBlock.class);
}
示例5: testFooterBlock
import org.apache.hadoop.yarn.webapp.test.WebAppTests; //导入方法依赖的package包/类
@Test public void testFooterBlock() {
WebAppTests.testBlock(FooterBlock.class);
}
示例6: testJQueryUI
import org.apache.hadoop.yarn.webapp.test.WebAppTests; //导入方法依赖的package包/类
@Test public void testJQueryUI() {
WebAppTests.testBlock(JQueryUI.class);
}
示例7: testShortBlock
import org.apache.hadoop.yarn.webapp.test.WebAppTests; //导入方法依赖的package包/类
@Test(expected=WebAppException.class) public void testShortBlock() {
WebAppTests.testBlock(ShortBlock.class);
}