1 package org.onap.sdc.dcae.utils;
3 import static org.assertj.core.api.Assertions.*;
5 import org.assertj.core.api.Assertions;
7 import org.onap.sdc.dcae.utils.Normalizers;
10 public class NormalizersTest {
13 public void normalizeVFCMTName_withDot_withoutDot(){
14 Assertions.assertThat(Normalizers.normalizeComponentName("my.dot")).isEqualTo("MyDot");
18 public void normalizeVFCMTName_withUnderscore_withoutUnderscore(){
19 Assertions.assertThat(Normalizers.normalizeComponentName("My_Monitoring_Template_example")).isEqualTo("MyMonitoringTemplateExample");
23 public void normalizeVFCMTName_withWhiteSpace_withoutWhiteSpace(){
24 Assertions.assertThat(Normalizers.normalizeComponentName(" my dot ")).isEqualTo("MyDot");
28 public void normalizeVFCMTName_withDash_withoutDash(){
29 Assertions.assertThat(Normalizers.normalizeComponentName("My-Monitoring-Template-example")).isEqualTo("MyMonitoringTemplateExample");
33 public void normalizeVFCMTName_notCapitalized_capitalized(){
34 Assertions.assertThat(Normalizers.normalizeComponentName("my monitoring template eXAMPLE")).isEqualTo("MyMonitoringTemplateExample");
38 public void normalizeArtifactLabel_withDash_withoutDash(){
39 Assertions.assertThat(Normalizers.normalizeArtifactLabel("blueprint-other")).isEqualTo("blueprintother");
43 public void normalizeArtifactLabel_withWhiteSpace_withoutWhiteSpace(){
44 Assertions.assertThat(Normalizers.normalizeArtifactLabel(" blueprint other")).isEqualTo("blueprintother");
48 public void normalizeArtifactLabel_withPlus_withoutPlus(){
49 Assertions.assertThat(Normalizers.normalizeArtifactLabel("+blueprint+++other+")).isEqualTo("blueprintother");