Remove spaces from dockerbuild script
[aaf/authz.git] / auth / auth-certman / src / test / java / org / onap / aaf / auth / cm / cert / JU_CSRMeta.java
1 /*******************************************************************************
2  * ============LICENSE_START====================================================
3  * * org.onap.aaf
4  * * ===========================================================================
5  * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
6  * * ===========================================================================
7  * * Licensed under the Apache License, Version 2.0 (the "License");
8  * * you may not use this file except in compliance with the License.
9  * * You may obtain a copy of the License at
10  * * 
11  *  *      http://www.apache.org/licenses/LICENSE-2.0
12  * * 
13  *  * Unless required by applicable law or agreed to in writing, software
14  * * distributed under the License is distributed on an "AS IS" BASIS,
15  * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * * See the License for the specific language governing permissions and
17  * * limitations under the License.
18  * * ============LICENSE_END====================================================
19  * *
20  * *
21  ******************************************************************************/
22 package org.onap.aaf.auth.cm.cert;
23
24 import static org.mockito.Mockito.mock;
25
26 import java.util.List;
27
28 import org.bouncycastle.pkcs.PKCS10CertificationRequest;
29 import org.junit.BeforeClass;
30 import org.junit.Rule;
31 import org.junit.Test;
32 import org.junit.rules.ExpectedException;
33 import org.junit.runner.RunWith;
34 import org.mockito.runners.MockitoJUnitRunner;
35 import org.onap.aaf.cadi.cm.CertException;
36 import org.onap.aaf.misc.env.Trans;
37
38 import junit.framework.Assert;
39
40 @RunWith(MockitoJUnitRunner.class)
41 public class JU_CSRMeta {
42         
43         private static CSRMeta csrmeta;
44         private static Trans trans;
45         private static PKCS10CertificationRequest req;
46         
47         @BeforeClass
48         public static void setUp() throws CertException {
49                 trans = mock(Trans.class);
50                 List<RDN> lrdn = RDN.parse('/',"o=ATT Services, Inc/l=St Louis/st=Missouri/c=US");
51                 
52                 csrmeta = new CSRMeta(lrdn);
53         }
54         
55 //      @Test
56 //      public void x500Name() throws IOException {
57 //              
58 //              X500Name x500 = csrmeta.x500Name();
59 //              assertEquals(x500.toString(),"CN=CN,E=pupleti@ht.com,OU=HAKJH787,O=O,L=L,ST=ST,C=C");
60 //      }
61 //      
62 //      @Test
63 //      public void initialConversationCert() throws CertificateException, OperatorCreationException, IOException {
64 //              X509Certificate cert = csrmeta.initialConversationCert(trans);
65 //              assertEquals(cert.getBasicConstraints(),-1);
66 //      }
67 //      
68 //      @Test
69 //      public void generateCSR() throws IOException, CertException {
70 //              req = csrmeta.generateCSR(trans);
71 //              assertNotNull(req);
72 //      }
73         
74         @Rule
75     public ExpectedException thrown= ExpectedException.none();
76         
77 //      @Test
78 //      public void dump() throws IOException, CertException {
79 //              req = csrmeta.generateCSR(trans);
80 //              csrmeta.dump(req);
81 //      }
82         
83         @Test                                           //TODO: Temporary fix AAF-111
84         public void netYetTested() {
85                 Assert.fail("Tests not yet implemented");
86         }
87         
88 }