Search in sources :

Example 11 with ExecutionTaskLog

use of com.emc.storageos.db.client.model.uimodels.ExecutionTaskLog in project coprhd-controller by CoprHD.

the class ExecutionTaskLogTest method testPersistObject.

@Test
public void testPersistObject() throws Exception {
    _logger.info("Starting persist ExecutionTaskLog test");
    ExecutionTaskLog model = new ExecutionTaskLog();
    model.setLabel("foo");
    model.setDetail("my detail");
    Long elapsed = new Long(42);
    model.setElapsed(elapsed);
    model.setStackTrace("my stack trace");
    save(model);
    model = findById(model.getId());
    Assert.assertNotNull(model);
    Assert.assertEquals("foo", model.getLabel());
    Assert.assertEquals("my detail", model.getDetail());
    Assert.assertEquals(elapsed, model.getElapsed());
    Assert.assertEquals("my stack trace", model.getStackTrace());
}
Also used : ExecutionTaskLog(com.emc.storageos.db.client.model.uimodels.ExecutionTaskLog) BaseModelTest(com.emc.sa.model.BaseModelTest) Test(org.junit.Test)

Aggregations

ExecutionTaskLog (com.emc.storageos.db.client.model.uimodels.ExecutionTaskLog)11 ExecutionState (com.emc.storageos.db.client.model.uimodels.ExecutionState)3 MissingResourceException (java.util.MissingResourceException)3 ExecutionLog (com.emc.storageos.db.client.model.uimodels.ExecutionLog)2 Order (com.emc.storageos.db.client.model.uimodels.Order)2 Date (java.util.Date)2 BaseModelTest (com.emc.sa.model.BaseModelTest)1 CatalogService (com.emc.storageos.db.client.model.uimodels.CatalogService)1 OrderParameter (com.emc.storageos.db.client.model.uimodels.OrderParameter)1 StorageOSUser (com.emc.storageos.security.authentication.StorageOSUser)1 ExecutionLogList (com.emc.vipr.model.catalog.ExecutionLogList)1 ExecutionLogRestRep (com.emc.vipr.model.catalog.ExecutionLogRestRep)1 GET (javax.ws.rs.GET)1 Path (javax.ws.rs.Path)1 Produces (javax.ws.rs.Produces)1 Test (org.junit.Test)1