*/
package org.onap.aai.modelloader.config;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
import java.io.File;
import java.io.FileInputStream;
import java.util.List;
import java.util.Properties;
import org.eclipse.jetty.util.security.Password;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.aai.modelloader.restclient.AaiRestClient;
import org.onap.sdc.utils.ArtifactTypeEnum;
assertEquals(3, types.size());
}
- @Test
- public void testMsgBusAddrs() {
- Properties props = new Properties();
- props.setProperty("ml.distribution.MSG_BUS_ADDRESSES", "host1.onap.com:3904,host2.onap.com:3904");
- ModelLoaderConfig config = new ModelLoaderConfig(props, null);
-
- List<String> addrs = config.getMsgBusAddress();
-
- assertEquals(2, addrs.size());
- assertEquals(0, addrs.get(0).compareToIgnoreCase("host1.onap.com:3904"));
- assertEquals(0, addrs.get(1).compareToIgnoreCase("host2.onap.com:3904"));
- }
-
@Test
public void testDecryptPassword() {
String password = "youshallnotpass";
ModelLoaderConfig config = new ModelLoaderConfig(props, null);
AaiRestClient aaiClient = new AaiRestClient(config);
- assertFalse("Empty AAI Password should result in no basic authentication", aaiClient.useBasicAuth());
+ assertFalse(aaiClient.useBasicAuth(), "Empty AAI Password should result in no basic authentication");
props.load(new FileInputStream("src/test/resources/model-loader-no-auth-password.properties"));
config = new ModelLoaderConfig(props, null);
aaiClient = new AaiRestClient(config);
- assertFalse("No AAI Password should result in no basic authentication", aaiClient.useBasicAuth());
+ assertFalse(aaiClient.useBasicAuth(), "No AAI Password should result in no basic authentication");
}
@Test