本文整理汇总了Java中org.sonar.api.web.page.Context类的典型用法代码示例。如果您正苦于以下问题:Java Context类的具体用法?Java Context怎么用?Java Context使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Context类属于org.sonar.api.web.page包,在下文中一共展示了Context类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: test
import org.sonar.api.web.page.Context; //导入依赖的package包/类
@Test
public void test() {
final IssueResolverPage subject = new IssueResolverPage();
final Context context = new Context();
Assert.assertEquals(0, context.getPages().size());
subject.define(context);
Assert.assertEquals(1, context.getPages().size());
}
示例2: given_framaCDashboard_when_callDefineWithNullContext_then_exception
import org.sonar.api.web.page.Context; //导入依赖的package包/类
@Test
public void given_framaCDashboard_when_callDefineWithNullContext_then_exception(){
org.sonar.api.web.page.Context context = new org.sonar.api.web.page.Context();
FramaCDashboard framaCDashboard = new FramaCDashboard();
framaCDashboard.define(context);
assertEquals(1, context.getPages().size());
}
示例3: define
import org.sonar.api.web.page.Context; //导入依赖的package包/类
@Override
public void define(Context context)
{
context
.addPage(Page.builder("licensecheck/configuration")
.setName("License Check")
.setAdmin(true)
.build());
context.addPage(Page.builder("licensecheck/dashboard")
.setName("License Check")
.setScope(Page.Scope.COMPONENT)
.setComponentQualifiers(Page.Qualifier.PROJECT)
.build());
}
示例4: define
import org.sonar.api.web.page.Context; //导入依赖的package包/类
@Override
public void define(final Context context) {
final Page issueresolverPage = Page.builder("issueresolver/entrypoint").setName("Issue resolver")
.setScope(Scope.COMPONENT).setComponentQualifiers(Qualifier.PROJECT).setAdmin(true).build();
context.addPage(issueresolverPage);
}
示例5: define
import org.sonar.api.web.page.Context; //导入依赖的package包/类
@Override
public void define(Context context) {
context
.addPage(buildMetricsSummaryPage());
}
示例6: beforeClass
import org.sonar.api.web.page.Context; //导入依赖的package包/类
@BeforeClass
public static void beforeClass(){
Plugin.Context context = mock(Plugin.Context.class);
FramaCPlugin plugin = new FramaCPlugin();
plugin.define(context);
}