本文整理汇总了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();
}
示例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();
}
示例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"));
}
示例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"));
}