当前位置: 首页>>代码示例>>Java>>正文


Java Sets类代码示例

本文整理汇总了Java中org.fest.util.Sets的典型用法代码示例。如果您正苦于以下问题:Java Sets类的具体用法?Java Sets怎么用?Java Sets使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Sets类属于org.fest.util包,在下文中一共展示了Sets类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: constructor_shouldSetIntentFilter

import org.fest.util.Sets; //导入依赖的package包/类
@Test
public void constructor_shouldSetIntentFilter() throws Exception {
    Set<String> expectedActions = Sets.newLinkedHashSet(
            ACTION_INTERSTITIAL_FAIL,
            ACTION_INTERSTITIAL_SHOW,
            ACTION_INTERSTITIAL_DISMISS,
            ACTION_INTERSTITIAL_CLICK
    );

    final IntentFilter intentFilter = EventForwardingBroadcastReceiver.getHtmlInterstitialIntentFilter();
    final Iterator<String> actionIterator = intentFilter.actionsIterator();

    assertThat(intentFilter.countActions()).isEqualTo(4);
    while (actionIterator.hasNext()) {
        assertThat(expectedActions.contains(actionIterator.next()));
    }
}
 
开发者ID:JSafaiyeh,项目名称:Fabric-Example-App-Android,代码行数:18,代码来源:EventForwardingBroadcastReceiverTest.java

示例2: testNonLicensedDependencyFails

import org.fest.util.Sets; //导入依赖的package包/类
@Test(expected = PluginException.class)
public void testNonLicensedDependencyFails() throws PluginException {
    Set<LicenseDependency> dependencies = Sets.newLinkedHashSet(
            LicenseDependency.of("Lib 1", new Dependency("group", "test"))
    );
    SaguaroConfig config = SaguaroConfig.of().build();
    resolve(dependencies, config).iterator().next();
}
 
开发者ID:willowtreeapps,项目名称:saguaro,代码行数:9,代码来源:TestDependencies.java

示例3: testIgnoredNonLicensedDependency

import org.fest.util.Sets; //导入依赖的package包/类
@Test
public void testIgnoredNonLicensedDependency() throws PluginException {
    Set<LicenseDependency> dependencies = Sets.newLinkedHashSet(
            LicenseDependency.of("Lib 1", new Dependency("group", "test"))
    );
    SaguaroConfig config = SaguaroConfig.of()
            .ignore(new Dependency("group", "test"))
            .build();
    Set<LicenseDependency> result = resolve(dependencies, config);
    assertThat(result).isEmpty();
}
 
开发者ID:willowtreeapps,项目名称:saguaro,代码行数:12,代码来源:TestDependencies.java

示例4: testSingleAlias

import org.fest.util.Sets; //导入依赖的package包/类
@Test
public void testSingleAlias() throws PluginException {
    Set<LicenseDependency> dependencies = Sets.newLinkedHashSet(
            LicenseDependency.of("Lib 1", LicenseInfo.withName("Test License Alias"))
    );
    SaguaroConfig config = SaguaroConfig.of()
            .aliases(new Alias(LicenseInfo.withName("Test License"), "Test License Alias"))
            .build();
    LicenseDependency result = resolve(dependencies, config).iterator().next();
    assertThat(result.getLicenses()).contains(LicenseInfo.withName("Test License"));
}
 
开发者ID:willowtreeapps,项目名称:saguaro,代码行数:12,代码来源:TestAliases.java

示例5: testBuildInAlias

import org.fest.util.Sets; //导入依赖的package包/类
@Test
public void testBuildInAlias() throws PluginException {
    Set<LicenseDependency> dependencies = Sets.newLinkedHashSet(
            LicenseDependency.of("Lib 1", LicenseInfo.withName("Apache License Version 2.0"))
    );
    SaguaroConfig config = SaguaroConfig.of().build();
    LicenseDependency result = resolve(dependencies, config).iterator().next();
    assertThat(result.getLicenses()).contains(LicenseInfo.withKey("apache2"));
}
 
开发者ID:willowtreeapps,项目名称:saguaro,代码行数:10,代码来源:TestAliases.java


注:本文中的org.fest.util.Sets类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。