Ejemplo n.º 1
0
  @Test
  public void constructors() throws Exception {
    EnumPropertyImpl property = new EnumPropertyImpl();
    assertNull(property.getValue());

    property = new EnumPropertyImpl("value");
    assertEquals("value", property.getValue());
  }
Ejemplo n.º 2
0
  @Test
  public void set_value() {
    EnumPropertyImpl property = new EnumPropertyImpl();

    property.setValue("value");
    assertEquals("value", property.getValue());
    assertTrue(property.is("value"));
    assertTrue(property.is("VALUE"));
    assertFalse(property.is("notvalue"));
    assertCollectionContains(property.getValueSupportedVersions());

    property.setValue("one");
    assertCollectionContains(property.getValueSupportedVersions(), V1_0);

    property.setValue("two");
    assertCollectionContains(property.getValueSupportedVersions(), V2_0_DEPRECATED, V2_0);
  }
Ejemplo n.º 3
0
 @Test
 public void toStringValues() {
   EnumPropertyImpl property = new EnumPropertyImpl();
   assertFalse(property.toStringValues().isEmpty());
 }