本文整理匯總了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));
}