* limitations under the License.
* ============LICENSE_END=========================================================
*/
+
package org.onap.aai.introspection.generator;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.util.ArrayList;
+import java.util.List;
+
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.onap.aai.introspection.*;
import org.onap.aai.introspection.exceptions.AAIUnknownObjectException;
-import java.util.ArrayList;
-import java.util.List;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
public class CreateExampleTest extends AAISetup {
-
- private static CreateExample createExample;
- private Loader loader;
+
+ private static CreateExample createExample;
+ private Loader loader;
private static boolean classLoaded = false;
-
-
+
@BeforeClass
public static void setUp() {
-
-
+
}
-
-
+
@Before
- public void createLoaderVersion(){
- if(!classLoaded){
+ public void createLoaderVersion() {
+ if (!classLoaded) {
loader = loaderFactory.createLoaderForVersion(ModelType.MOXY, schemaVersions.getAppRootVersion());
createExample = new CreateExample(loader, "edge-prop-names");
classLoaded = false;
}
}
-
+
@Test
public void testGetExampleObject() throws AAIException {
Introspector introspector = loader.introspectorFromName("edge-prop-names");
Introspector introspector = loader.introspectorFromName("edge-prop-names");
createExample.processPrimitive(propName, introspector);
}
-
+
@Test
public void testProcessPrimitiveLong() throws AAIUnknownObjectException {
String propName = "vlan-id-inner";
Introspector introspector = loader.introspectorFromName("vserver");
createExample.processPrimitive(propName, introspector);
}
-
+
@Test
public void testProcessPrimitiveInteger() throws AAIUnknownObjectException {
String propName = "module-index";
Introspector introspector = loader.introspectorFromName("vf-module");
createExample.processPrimitive(propName, introspector);
}
-
+
@Test
public void testProcessPrimitiveList() throws AAIUnknownObjectException {
String propName = "ipaddress-v4-vig";