本文整理汇总了Java中org.fest.util.Sets.newLinkedHashSet方法的典型用法代码示例。如果您正苦于以下问题:Java Sets.newLinkedHashSet方法的具体用法?Java Sets.newLinkedHashSet怎么用?Java Sets.newLinkedHashSet使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.fest.util.Sets
的用法示例。
在下文中一共展示了Sets.newLinkedHashSet方法的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"));
}