/*
* ============LICENSE_START=======================================================
- * Modifications Copyright (C) 2019 AT&T Intellectual Property.
+ * Modifications Copyright (C) 2019-2020 AT&T Intellectual Property.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
package org.onap.policy.sim.dmaap.startstop;
+import static org.assertj.core.api.Assertions.assertThatCode;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import org.junit.After;
public void testMain_NoArguments() {
final String[] NormalParameters = {};
main = new Main(NormalParameters);
- assertTrue(main.getParameters() == null);
+ assertNull(main.getParameters());
}
@Test
// note: this is missing the "-c" argument, thus the ARGUMENTS are invalid
final String[] NormalParameters = {"parameters/NormalParameters.json"};
main = new Main(NormalParameters);
- assertTrue(main.getParameters() == null);
+ assertNull(main.getParameters());
}
@Test
public void testMain_Help() {
final String[] NormalParameters = {"-h"};
- Main.main(NormalParameters);
+ assertThatCode(() -> Main.main(NormalParameters)).doesNotThrowAnyException();
}
@Test
public void testMain_InvalidParameters() {
final String[] NormalParameters = {"-c", "parameters/InvalidParameters.json"};
main = new Main(NormalParameters);
- assertTrue(main.getParameters() == null);
+ assertNull(main.getParameters());
}
}