use of com.haulmont.cuba.core.global.LoadContext in project cuba by cuba-platform.
the class SoftDeleteNotFoundDeletedTest method testLoadDeletedObject.
@Test
public void testLoadDeletedObject() {
View taskView_Message = new View(SoftDelete_Task.class).addProperty("message");
View taskView_Service = new View(SoftDelete_Task.class).addProperty("service", new View(SoftDelete_Service.class).addProperty("code"));
View taskValueView = new View(SoftDelete_TaskValue.class).addProperty("task", taskView_Message);
View projectView = new View(SoftDelete_Project.class).addProperty("name").addProperty("aValue", taskValueView).addProperty("task", taskView_Service);
LoadContext<SoftDelete_Project> loadContext = new LoadContext<>(SoftDelete_Project.class).setView(projectView).setId(projectId);
SoftDelete_Project project = dataManager.load(loadContext);
Assertions.assertNotNull(project);
Assertions.assertNotNull(project.getTask());
Assertions.assertTrue(project.getTask().isDeleted());
}
Aggregations