aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/datatypes/PropertyTypeTest.java
blob: 470dd9784a56cdbf737913bd5c10f71c389c1b60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package org.openecomp.sdc.tosca.datatypes;

import org.openecomp.sdc.tosca.datatypes.model.PropertyType;
import org.junit.Assert;
import org.junit.Test;

public class PropertyTypeTest {
  @Test
  public void shouldReturnNullWhenDisplayNameDoesNotExistForAnyProperty() {
    String s = "blabla";
    Assert.assertEquals(PropertyType.getPropertyTypeByDisplayName(s), null);
  }

  @Test
  public void shouldReturnApproppriatePropertyTypeWhenDisplayNameExist() {
    String s = "scalar-unit.size";
    Assert
        .assertEquals(PropertyType.getPropertyTypeByDisplayName(s), PropertyType.SCALAR_UNIT_SIZE);
  }
}