Mass removal of all Tabs (Style Warnings)
[aaf/authz.git] / misc / xgen / src / test / java / org / onap / aaf / misc / xgen / JU_DynamicCodeTest.java
1 /**\r
2  * ============LICENSE_START====================================================\r
3  * org.onap.aaf\r
4  * ===========================================================================\r
5  * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.\r
6  * ===========================================================================\r
7  * Licensed under the Apache License, Version 2.0 (the "License");\r
8  * you may not use this file except in compliance with the License.\r
9  * You may obtain a copy of the License at\r
10  * \r
11  *      http://www.apache.org/licenses/LICENSE-2.0\r
12  * \r
13  * Unless required by applicable law or agreed to in writing, software\r
14  * distributed under the License is distributed on an "AS IS" BASIS,\r
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
16  * See the License for the specific language governing permissions and\r
17  * limitations under the License.\r
18  * ============LICENSE_END====================================================\r
19  *\r
20  */\r
21 \r
22 package org.onap.aaf.misc.xgen;\r
23 \r
24 import static org.junit.Assert.assertEquals;\r
25 import static org.junit.Assert.assertNull;\r
26 \r
27 import java.io.IOException;\r
28 import java.io.PrintWriter;\r
29 \r
30 import org.junit.Test;\r
31 import org.onap.aaf.misc.env.APIException;\r
32 import org.onap.aaf.misc.env.Env;\r
33 import org.onap.aaf.misc.env.Trans;\r
34 import org.onap.aaf.misc.xgen.html.HTML4Gen;\r
35 import org.onap.aaf.misc.xgen.html.HTMLGen;\r
36 import org.onap.aaf.misc.xgen.html.State;\r
37 \r
38 public class JU_DynamicCodeTest {\r
39 \r
40     @Test\r
41     public void test() throws APIException, IOException {\r
42         final Cache<HTMLGen> cache1 = new Cache<HTMLGen>() {\r
43 \r
44             @Override\r
45             public void dynamic(HTMLGen hgen, Code<HTMLGen> code) {\r
46             }\r
47         };\r
48 \r
49         final HTMLGen xgen1 = new HTML4Gen(new PrintWriter(System.out));\r
50         DynamicCode<HTMLGen, State<Env>, Trans> g = new DynamicCode<HTMLGen, State<Env>, Trans>() {\r
51 \r
52             @Override\r
53             public void code(State<Env> state, Trans trans, Cache<HTMLGen> cache, HTMLGen xgen)\r
54                     throws APIException, IOException {\r
55                 assertNull(state);\r
56                 assertNull(trans);\r
57                 assertEquals(cache, cache1);\r
58                 assertEquals(xgen, xgen1);\r
59             }\r
60         };\r
61 \r
62         g.code(cache1, xgen1);\r
63     }\r
64 \r
65 }\r