diff options
author | 2020-10-12 00:28:43 +0000 | |
---|---|---|
committer | 2020-10-12 00:28:43 +0000 | |
commit | c8d244d826cc1d9b2ad7aeb0ca0874e321ad4577 (patch) | |
tree | 6e24838c5c4c7c55fa00d8ed8ad2b561d9f00218 /mod/bpgenerator/src/test | |
parent | 8896e39d2b401f06fbc5eee35a12787a8f98848d (diff) | |
parent | 4f7d736f2e4997d13727bffabc982abf1a2522d8 (diff) |
Merge "Improve code quality in ResourceConfig"
Diffstat (limited to 'mod/bpgenerator/src/test')
-rw-r--r-- | mod/bpgenerator/src/test/java/org/onap/blueprintgenerator/models/blueprint/ResourceConfigTest.java | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/mod/bpgenerator/src/test/java/org/onap/blueprintgenerator/models/blueprint/ResourceConfigTest.java b/mod/bpgenerator/src/test/java/org/onap/blueprintgenerator/models/blueprint/ResourceConfigTest.java new file mode 100644 index 0000000..cf12da1 --- /dev/null +++ b/mod/bpgenerator/src/test/java/org/onap/blueprintgenerator/models/blueprint/ResourceConfigTest.java @@ -0,0 +1,38 @@ +/*============LICENSE_START======================================================= + org.onap.dcae + ================================================================================ + Copyright (c) 2020 Nokia. 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. + 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. + ============LICENSE_END========================================================= + */ + +package org.onap.blueprintgenerator.models.blueprint; + +import static org.junit.Assert.assertEquals; + +import java.util.LinkedHashMap; +import java.util.TreeMap; +import org.junit.Test; + +public class ResourceConfigTest { + + @Test + public void createResourceConfig() { + TreeMap<String, LinkedHashMap<String, Object>> result = new ResourceConfig() + .createResourceConfig(new TreeMap<>(), "demo"); + + String expectedResult = "{demo_cpu_limit={type=string, default=250m}, demo_cpu_request={type=string, default=250m}, demo_memory_limit={type=string, default=128Mi}, demo_memory_request={type=string, default=128Mi}}"; + assertEquals(expectedResult, result.toString()); + } +} |