Index: C:/harmony/trunk_0427/modules/security/src/test/api/java.injected/javax/security/cert/X509CertificateTest.java =================================================================== --- C:/harmony/trunk_0427/modules/security/src/test/api/java.injected/javax/security/cert/X509CertificateTest.java (revision 0) +++ C:/harmony/trunk_0427/modules/security/src/test/api/java.injected/javax/security/cert/X509CertificateTest.java (revision 0) @@ -0,0 +1,66 @@ +/* + * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** +* @author Vladimir Ivanov +* @version $Revision$ +*/ + +package javax.security.cert; + +import java.io.InputStream; + +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; + +/** + * X509CertificateTest + */ +public class X509CertificateTest extends TestCase { + /** + * @tests javax.security.cert.X509Certificate#getInstance(byte[]); + */ + public void testGetInstanceB() { + // Regression for HARMONY-756 + try { + X509Certificate.getInstance((byte[]) null); + } catch (CertificateException e) { + //expected; + } + } + + /** + * @tests javax.security.cert.X509Certificate#getInstance(InputStream); + */ + public void testGetInstanceIS() { + // Regression for HARMONY-756 + try { + X509Certificate.getInstance((InputStream) null); + } catch (CertificateException e) { + //expected; + } + } + + public static Test suite() { + return new TestSuite(X509CertificateTest.class); + } + + public static void main(String[] args) { + junit.textui.TestRunner.run(suite()); + } +} +