From 4545ce1221e81f15f73cbadaedd1ccfb3ba42c41 Mon Sep 17 00:00:00 2001 From: Michael Hwang Date: Thu, 14 Mar 2019 13:48:02 -0400 Subject: Increase unit test coverage Change-Id: Id1067160082d117f2e48ad1476dfb0b3ba65134b Issue-ID: DCAEGEN2-1263 Signed-off-by: Michael Hwang --- .../java/org/onap/dcae/inventory/InventoryConfigurationTest.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/test/java/org/onap/dcae/inventory/InventoryConfigurationTest.java') diff --git a/src/test/java/org/onap/dcae/inventory/InventoryConfigurationTest.java b/src/test/java/org/onap/dcae/inventory/InventoryConfigurationTest.java index 1848a42..1935d8d 100644 --- a/src/test/java/org/onap/dcae/inventory/InventoryConfigurationTest.java +++ b/src/test/java/org/onap/dcae/inventory/InventoryConfigurationTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * dcae-inventory * ================================================================================ - * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,6 +21,7 @@ package org.onap.dcae.inventory; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; import static org.junit.Assert.fail; import java.io.File; @@ -55,6 +56,12 @@ public class InventoryConfigurationTest { assertEquals(configuration.getDatabusControllerConnection().getHost(), "databus-controller-hostname"); assertEquals((long) configuration.getDatabusControllerConnection().getPort(), 8443); assertEquals(configuration.getDatabusControllerConnection().getRequired(), true); + assertEquals(configuration.getDatabusControllerConnection().getMechId(), "some-mech-id"); + assertEquals(configuration.getDatabusControllerConnection().getPassword(), "some-password"); + + configuration.setDefaultName("foo-config"); + assertEquals(configuration.getDefaultName(), "foo-config"); + assertNotNull(configuration.getJerseyClientConfiguration()); assertEquals(configuration.getDataSourceFactory().getUrl(), "jdbc:postgresql://127.0.0.1:5432/dcae_inv"); } catch (Exception e) { -- cgit 1.2.3-korg