本文整理汇总了Java中java.security.cert.CollectionCertStoreParameters.getCollection方法的典型用法代码示例。如果您正苦于以下问题:Java CollectionCertStoreParameters.getCollection方法的具体用法?Java CollectionCertStoreParameters.getCollection怎么用?Java CollectionCertStoreParameters.getCollection使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类java.security.cert.CollectionCertStoreParameters
的用法示例。
在下文中一共展示了CollectionCertStoreParameters.getCollection方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testCollectionCertStoreParameters02
import java.security.cert.CollectionCertStoreParameters; //导入方法依赖的package包/类
/**
* Test #2 for <code>CollectionCertStoreParameters</code> constructor<br>
*/
@TestTargetNew(
level = TestLevel.PARTIAL_COMPLETE,
notes = "",
method = "CollectionCertStoreParameters",
args = {}
)
@SuppressWarnings("unchecked")
public final void testCollectionCertStoreParameters02() {
CollectionCertStoreParameters cp = new CollectionCertStoreParameters();
Collection c = cp.getCollection();
assertTrue("isEmpty", c.isEmpty());
// check that empty collection is immutable
try {
// try to modify it
c.add(new Object());
fail("empty collection must be immutable");
} catch (Exception e) {
}
}
示例2: testCollectionCertStoreParameters02
import java.security.cert.CollectionCertStoreParameters; //导入方法依赖的package包/类
/**
* Test #2 for <code>CollectionCertStoreParameters</code> constructor<br>
* Assertion: Creates an instance of CollectionCertStoreParameters
* with the default parameter values (an empty and immutable Collection)
*/
public final void testCollectionCertStoreParameters02() {
CollectionCertStoreParameters cp = new CollectionCertStoreParameters();
Collection c = cp.getCollection();
assertTrue("isEmpty", c.isEmpty());
// check that empty collection is immutable
try {
// try to modify it
c.add(new Object());
fail("empty collection must be immutable");
} catch (Exception e) {
}
}