Search in sources :

Example 1 with EntityResourceAction

use of org.xwiki.resource.entity.EntityResourceAction in project xwiki-platform by xwiki.

the class EntityResourceActionTest method fromString.

@Test
public void fromString() {
    EntityResourceAction id = EntityResourceAction.fromString("view");
    assertEquals(EntityResourceAction.VIEW, id);
}
Also used : EntityResourceAction(org.xwiki.resource.entity.EntityResourceAction)

Example 2 with EntityResourceAction

use of org.xwiki.resource.entity.EntityResourceAction in project xwiki-platform by xwiki.

the class EntityResourceActionTest method equalsAndHashCode.

@Test
public void equalsAndHashCode() {
    EntityResourceAction id1 = new EntityResourceAction("action");
    EntityResourceAction id2 = new EntityResourceAction("action");
    assertEquals(id1.hashCode(), id2.hashCode());
    assertEquals(id1, id2);
    assertEquals(id1.getActionName(), id2.getActionName());
}
Also used : EntityResourceAction(org.xwiki.resource.entity.EntityResourceAction)

Aggregations

EntityResourceAction (org.xwiki.resource.entity.EntityResourceAction)2