diff options
author | Ryan Goulding <ryandgoulding@gmail.com> | 2017-09-19 11:14:41 -0400 |
---|---|---|
committer | Ryan Goulding <ryandgoulding@gmail.com> | 2017-09-20 16:21:46 +0000 |
commit | 03235aa6cc35871630ee3e09fe467eca79ce315e (patch) | |
tree | 30f362896e30fdd8ab52859b15ab1d0ddc5a4211 /dblib/provider/src/test/java | |
parent | 9a236162e1c3fd5dcc425544c5ecf5290b0fafb2 (diff) |
Abstract utility classes for re-use
When looking at the existing uses of BundleActivator(s), it became
immediately clear that other parts of the code have a strategy based
properties file resolution very similar to those abstracted by dblib.
This change aggregates a separate utils bundle for this functionality,
which is further abstracted for potential reuse with other use cases.
The next use case is in the sli bundle, which will be handled in
a follow-up patch.
Issue-Id: SDNC-54
Change-Id: Ie4d4bb679617474b1983e6044c08cca1742b9893
Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
Diffstat (limited to 'dblib/provider/src/test/java')
4 files changed, 0 insertions, 76 deletions
diff --git a/dblib/provider/src/test/java/org/onap/ccsdk/sli/core/dblib/propertiesfileresolver/DblibDefaultFileResolverTest.java b/dblib/provider/src/test/java/org/onap/ccsdk/sli/core/dblib/propertiesfileresolver/DblibDefaultFileResolverTest.java deleted file mode 100644 index 41011e55b..000000000 --- a/dblib/provider/src/test/java/org/onap/ccsdk/sli/core/dblib/propertiesfileresolver/DblibDefaultFileResolverTest.java +++ /dev/null @@ -1,24 +0,0 @@ -package org.onap.ccsdk.sli.core.dblib.propertiesfileresolver; - -import static org.junit.Assert.*; - -import java.io.File; -import java.util.Optional; -import org.junit.Test; - -public class DblibDefaultFileResolverTest { - - @Test - public void resolveFile() throws Exception { - final DblibPropertiesFileResolver resolver = new DblibDefaultFileResolver("success"); - final Optional<File> file = resolver.resolveFile("doesnotexist.cfg"); - assertFalse(file.isPresent()); - } - - @Test - public void getSuccessfulResolutionMessage() throws Exception { - final DblibPropertiesFileResolver resolver = new DblibDefaultFileResolver("success"); - assertEquals("success", resolver.getSuccessfulResolutionMessage()); - } - -}
\ No newline at end of file diff --git a/dblib/provider/src/test/java/org/onap/ccsdk/sli/core/dblib/propertiesfileresolver/DblibEnvVarFileResolverTest.java b/dblib/provider/src/test/java/org/onap/ccsdk/sli/core/dblib/propertiesfileresolver/DblibEnvVarFileResolverTest.java deleted file mode 100644 index 775898930..000000000 --- a/dblib/provider/src/test/java/org/onap/ccsdk/sli/core/dblib/propertiesfileresolver/DblibEnvVarFileResolverTest.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.onap.ccsdk.sli.core.dblib.propertiesfileresolver; - -import static org.junit.Assert.*; - -import java.io.File; -import java.util.Optional; -import org.junit.Test; - -public class DblibEnvVarFileResolverTest { - @Test - public void resolveFile() throws Exception { - final DblibPropertiesFileResolver resolver = new DblibEnvVarFileResolver("success"); - final Optional<File> file = resolver.resolveFile("doesnotexist.cfg"); - assertFalse(file.isPresent()); - } - - @Test - public void getSuccessfulResolutionMessage() throws Exception { - final DblibPropertiesFileResolver resolver = new DblibEnvVarFileResolver("success"); - assertEquals("success", resolver.getSuccessfulResolutionMessage()); - } - -}
\ No newline at end of file diff --git a/dblib/provider/src/test/java/org/onap/ccsdk/sli/core/dblib/propertiesfileresolver/DblibJREFileResolverTest.java b/dblib/provider/src/test/java/org/onap/ccsdk/sli/core/dblib/propertiesfileresolver/DblibJREFileResolverTest.java deleted file mode 100644 index 65ebfbae2..000000000 --- a/dblib/provider/src/test/java/org/onap/ccsdk/sli/core/dblib/propertiesfileresolver/DblibJREFileResolverTest.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.onap.ccsdk.sli.core.dblib.propertiesfileresolver; - -import static org.junit.Assert.*; - -import org.junit.Test; - -public class DblibJREFileResolverTest { - - @Test - public void getSuccessfulResolutionMessage() throws Exception { - final DblibPropertiesFileResolver resolver = new DblibJREFileResolver("success"); - assertEquals("success", resolver.getSuccessfulResolutionMessage()); - } - -}
\ No newline at end of file diff --git a/dblib/provider/src/test/java/org/onap/ccsdk/sli/core/dblib/propertiesfileresolver/DblibKarafRootFileResolverTest.java b/dblib/provider/src/test/java/org/onap/ccsdk/sli/core/dblib/propertiesfileresolver/DblibKarafRootFileResolverTest.java deleted file mode 100644 index 0a032e8b7..000000000 --- a/dblib/provider/src/test/java/org/onap/ccsdk/sli/core/dblib/propertiesfileresolver/DblibKarafRootFileResolverTest.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.onap.ccsdk.sli.core.dblib.propertiesfileresolver; - -import static org.junit.Assert.*; - -import org.junit.Test; - -public class DblibKarafRootFileResolverTest { - @Test - public void getSuccessfulResolutionMessage() throws Exception { - final DblibPropertiesFileResolver resolver = new DblibKarafRootFileResolver("success", null); - assertEquals("success", resolver.getSuccessfulResolutionMessage()); - } - -}
\ No newline at end of file |