當前位置: 首頁>>代碼示例>>Java>>正文


Java UsageItem類代碼示例

本文整理匯總了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&param=bla");

    assertUsage(aggregator.getUsage(), EnumSet.allOf(UsageItem.class));
}
 
開發者ID:nidi3,項目名稱:raml-tester-uc-servlet,代碼行數:13,代碼來源:HttpComponentsTest.java

示例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()));
    }
}
 
開發者ID:nidi3,項目名稱:raml-tester,代碼行數:8,代碼來源:ExpectedUsage.java

示例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());
    }
}
 
開發者ID:nidi3,項目名稱:raml-tester-uc-servlet,代碼行數:6,代碼來源:HttpComponentsTest.java

示例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));
}
 
開發者ID:nidi3,項目名稱:raml-tester,代碼行數:5,代碼來源:ExpectedUsage.java


注:本文中的guru.nidi.ramltester.core.UsageItem類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。