Search in sources :

Example 1 with LockedPeriod

use of org.activityinfo.server.database.hibernate.entity.LockedPeriod in project activityinfo by bedatadriven.

the class UpdateSiteTest method testUpdateLockedPeriod.

@Test
public void testUpdateLockedPeriod() throws CommandException {
    Map<String, Object> changes = new HashMap<String, Object>();
    changes.put("enabled", false);
    execute(new UpdateEntity("LockedPeriod", 1, changes));
    // assure that the change has been effected
    LockedPeriod lockedPeriod = em.find(LockedPeriod.class, 1);
    Assert.assertEquals("enabled", false, lockedPeriod.isEnabled());
}
Also used : UpdateEntity(org.activityinfo.legacy.shared.command.UpdateEntity) HashMap(java.util.HashMap) LockedPeriod(org.activityinfo.server.database.hibernate.entity.LockedPeriod) Test(org.junit.Test)

Aggregations

HashMap (java.util.HashMap)1 UpdateEntity (org.activityinfo.legacy.shared.command.UpdateEntity)1 LockedPeriod (org.activityinfo.server.database.hibernate.entity.LockedPeriod)1 Test (org.junit.Test)1