本文整理汇总了Java中guru.nidi.ramltester.core.UsageItem类的典型用法代码示例。如果您正苦于以下问题:Java UsageItem类的具体用法?Java UsageItem怎么用?Java UsageItem使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
UsageItem类属于guru.nidi.ramltester.core包,在下文中一共展示了UsageItem类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testRequestAndResponse
import guru.nidi.ramltester.core.UsageItem; //导入依赖的package包/类
@Test
public void testRequestAndResponse() throws IOException {
final SimpleReportAggregator aggregator = new SimpleReportAggregator();
final RamlHttpClient client = baseClient.aggregating(aggregator);
send(client, "http://localhost:8081/greetings?nofilter");
send(client, "http://localhost:8081/greeting?nofilter");
send(client, "http://localhost:8081/greeting?nofilter&name=ddd");
send(client, "http://localhost:8081/greeting?nofilter&name=ddd¶m=bla");
assertUsage(aggregator.getUsage(), EnumSet.allOf(UsageItem.class));
}
示例2: verify
import guru.nidi.ramltester.core.UsageItem; //导入依赖的package包/类
@Override
protected void verify() throws Throwable {
final Usage usage = usageProvider.getUsage();
for (final UsageItem item : items) {
assertThat(item.get(usage), new EmptyMatcher(new Message("usage." + item.name()).toString()));
}
}
示例3: assertUsage
import guru.nidi.ramltester.core.UsageItem; //导入依赖的package包/类
private void assertUsage(Usage usage, EnumSet<UsageItem> usageItems) {
for (UsageItem usageItem : usageItems) {
assertEquals(usageItem.name(), 0, usageItem.get(usage).size());
}
}
示例4: ExpectedUsage
import guru.nidi.ramltester.core.UsageItem; //导入依赖的package包/类
public ExpectedUsage(UsageProvider usageProvider, UsageItem... items) {
this.usageProvider = usageProvider;
this.items = items.length == 0 ? EnumSet.allOf(UsageItem.class) : EnumSet.copyOf(Arrays.asList(items));
}