diff options
Diffstat (limited to 'ms/controllerblueprints/modules/blueprint-core/src/test')
2 files changed, 39 insertions, 6 deletions
diff --git a/ms/controllerblueprints/modules/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/TopologicalSortingUtilsTest.kt b/ms/controllerblueprints/modules/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/TopologicalSortingUtilsTest.kt index 08b77bd4e..5da43484c 100644 --- a/ms/controllerblueprints/modules/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/TopologicalSortingUtilsTest.kt +++ b/ms/controllerblueprints/modules/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/TopologicalSortingUtilsTest.kt @@ -17,20 +17,22 @@ package org.onap.ccsdk.cds.controllerblueprints.core.utils import org.junit.Test +import org.slf4j.LoggerFactory class TopologicalSortingUtilsTest { - + + private val log = LoggerFactory.getLogger(TopologicalSortingUtilsTest::class.java) @Test - fun testSorting(): Unit { + fun testSorting() { val graph: TopologicalSortingUtils<String> = TopologicalSortingUtils() graph.add("bundle-id", "bundle-mac") graph.add("bundle-id", "bundle-ip") graph.add("bundle-mac", "bundle-ip") graph.add("bundle-ip", "bundle-mac") - println("The current graph: " + graph) - println("In-degrees: " + graph.inDegree()) - println("Out-degrees: " + graph.outDegree()) - println("A topological sort of the vertices: " + graph.topSort()) + log.debug("The current graph: $graph") + log.debug("In-degrees: " + graph.inDegree()) + log.debug("Out-degrees: " + graph.outDegree()) + log.debug("A topological sort of the vertices: " + graph.topSort()) } }
\ No newline at end of file diff --git a/ms/controllerblueprints/modules/blueprint-core/src/test/resources/logback-test.xml b/ms/controllerblueprints/modules/blueprint-core/src/test/resources/logback-test.xml new file mode 100644 index 000000000..83e0bc674 --- /dev/null +++ b/ms/controllerblueprints/modules/blueprint-core/src/test/resources/logback-test.xml @@ -0,0 +1,31 @@ +<!-- + ~ Copyright © 2019 IBM. + ~ + ~ Licensed under the Apache License, Version 2.0 (the "License"); + ~ you may not use this file except in compliance with the License. + ~ You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License. + --> + +<configuration> + <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> + <!-- encoders are assigned the type + ch.qos.logback.classic.encoder.PatternLayoutEncoder by default --> + <encoder> + <pattern>%d{HH:mm:ss.SSS} %-5level [%thread] %logger{50} - %msg%n</pattern> + </encoder> + </appender> + + <logger name="org.onap.ccsdk.cds.controllerblueprints" level="info"/> + <root level="info"> + <appender-ref ref="STDOUT"/> + </root> + +</configuration> |