[pkg-java] r17928 - trunk/ca-certificates-java/src/test/java/org/debian/security
Emmanuel Bourg
ebourg-guest at moszumanska.debian.org
Mon Mar 24 12:48:21 UTC 2014
Author: ebourg-guest
Date: 2014-03-24 12:48:21 +0000 (Mon, 24 Mar 2014)
New Revision: 17928
Modified:
trunk/ca-certificates-java/src/test/java/org/debian/security/UpdateCertificatesTest.java
Log:
Unit test for UpdateCertificates.processChanges()
Modified: trunk/ca-certificates-java/src/test/java/org/debian/security/UpdateCertificatesTest.java
===================================================================
--- trunk/ca-certificates-java/src/test/java/org/debian/security/UpdateCertificatesTest.java 2014-03-24 12:32:19 UTC (rev 17927)
+++ trunk/ca-certificates-java/src/test/java/org/debian/security/UpdateCertificatesTest.java 2014-03-24 12:48:21 UTC (rev 17928)
@@ -19,6 +19,7 @@
package org.debian.security;
import java.io.File;
+import java.io.StringReader;
import org.junit.Before;
import org.junit.Test;
@@ -136,4 +137,14 @@
keystore.load();
assertEquals(false, keystore.contains(ALIAS_CACERT));
}
+
+ @Test
+ public void testProcessChanges() throws Exception {
+ UpdateCertificates uc = new UpdateCertificates(ksFilename, ksPassword);
+ uc.processChanges(new StringReader(ADD_CACERT + "\n" + INVALID_CACERT + "\n" + REMOVE_CACERT + "\n"));
+ uc.finish();
+
+ KeyStoreHandler keystore = new KeyStoreHandler(ksFilename, ksPassword.toCharArray());
+ assertEquals(false, keystore.contains(ALIAS_CACERT));
+ }
}
More information about the pkg-java-commits
mailing list