diff options
author | Rama-Huawei <rama.subba.reddy.s@huawei.com> | 2019-04-15 17:50:22 +0530 |
---|---|---|
committer | Rama-Huawei <rama.subba.reddy.s@huawei.com> | 2019-04-15 17:50:22 +0530 |
commit | a36b7ed7cc57c5dae4c5bd1a21f1143acb0332d6 (patch) | |
tree | 888473b0ffa88d52fdda45086ba8dfdef311a016 /components/datalake-handler/feeder | |
parent | ad9f9f825a8c343d036eec7026b2a607f99b64df (diff) |
Unit test code for datalake seed code
Improved Util module code coverage
Issue-ID: DCAEGEN2-1309
Change-Id: Ia962c32a284f0b372f17a0e79da4ae1fe6a4b573
Signed-off-by: Rama-Huawei <rama.subba.reddy.s@huawei.com>
Diffstat (limited to 'components/datalake-handler/feeder')
-rw-r--r-- | components/datalake-handler/feeder/src/test/java/org/onap/datalake/feeder/util/UtilTest.java | 60 |
1 files changed, 32 insertions, 28 deletions
diff --git a/components/datalake-handler/feeder/src/test/java/org/onap/datalake/feeder/util/UtilTest.java b/components/datalake-handler/feeder/src/test/java/org/onap/datalake/feeder/util/UtilTest.java index b0f5492d..dc318ffb 100644 --- a/components/datalake-handler/feeder/src/test/java/org/onap/datalake/feeder/util/UtilTest.java +++ b/components/datalake-handler/feeder/src/test/java/org/onap/datalake/feeder/util/UtilTest.java @@ -1,43 +1,47 @@ /* -* ============LICENSE_START======================================================= -* ONAP : DCAE -* ================================================================================ -* Copyright 2019 China Mobile -*================================================================================= -* 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========================================================= -*/ + * ============LICENSE_START======================================================= + * ONAP : DCAE + * ================================================================================ + * Copyright 2019 China Mobile + *================================================================================= + * 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.datalake.feeder.util; -import static org.junit.Assert.assertEquals; - import org.junit.Test; +import java.io.IOException; + +import static org.junit.Assert.assertEquals; + /** * test utils - * - * @author Guobiao Mo * + * @author Guobiao Mo */ public class UtilTest { - + @Test //only dot(.) in key got replaced - public void replaceDotInKey() { - String a = "\"u-y.t.y-t\":\"u.gfh\",\\\"jg.h\\\":\"j_9889\""; - String b = "\"u-y_t_y-t\":\"u.gfh\",\\\"jg_h\\\":\"j_9889\""; + public void replaceDotInKey() { + String a = "\"u-y.t.y-t\":\"u.gfh\",\\\"jg.h\\\":\"j_9889\""; + String b = "\"u-y_t_y-t\":\"u.gfh\",\\\"jg_h\\\":\"j_9889\""; + + assertEquals(Util.replaceDotInKey(a), b); - assertEquals(Util.replaceDotInKey(a), b); - } + String[] strArray2 = {"test1", "test2", "test3"}; + Util.main(strArray2); + } } |