Search in sources :

Example 11 with ProjectDTO

use of org.activityinfo.legacy.shared.model.ProjectDTO in project activityinfo by bedatadriven.

the class ProjectTest method updateProject.

@Test
public void updateProject() {
    setUser(1);
    SchemaDTO schema = execute(new GetSchema());
    ProjectDTO project = schema.getProjectById(2);
    project.setName("RRMP II");
    project.setDescription("RRMP The Next Generation");
    execute(RequestChange.update(project, "name", "description"));
    schema = execute(new GetSchema());
    assertThat(schema.getProjectById(2).getName(), equalTo("RRMP II"));
    assertThat(schema.getProjectById(2).getDescription(), equalTo("RRMP The Next Generation"));
    project.setName("RRMP III");
    project.setDescription(null);
    execute(RequestChange.update(project, "name", "description"));
}
Also used : ProjectDTO(org.activityinfo.legacy.shared.model.ProjectDTO) SchemaDTO(org.activityinfo.legacy.shared.model.SchemaDTO) Test(org.junit.Test)

Aggregations

ProjectDTO (org.activityinfo.legacy.shared.model.ProjectDTO)11 AsyncCallback (com.google.gwt.user.client.rpc.AsyncCallback)4 PartnerDTO (org.activityinfo.legacy.shared.model.PartnerDTO)4 FormDialogCallback (org.activityinfo.ui.client.page.common.dialog.FormDialogCallback)4 CreateResult (org.activityinfo.legacy.shared.command.result.CreateResult)3 FormDialogTether (org.activityinfo.ui.client.page.common.dialog.FormDialogTether)3 ListStore (com.extjs.gxt.ui.client.store.ListStore)2 AddProject (org.activityinfo.legacy.shared.command.AddProject)2 VoidResult (org.activityinfo.legacy.shared.command.result.VoidResult)2 SchemaDTO (org.activityinfo.legacy.shared.model.SchemaDTO)2 Test (org.junit.Test)2 ModelData (com.extjs.gxt.ui.client.data.ModelData)1 Record (com.extjs.gxt.ui.client.store.Record)1 FitLayout (com.extjs.gxt.ui.client.widget.layout.FitLayout)1 SafeHtml (com.google.gwt.safehtml.shared.SafeHtml)1 SafeHtmlBuilder (com.google.gwt.safehtml.shared.SafeHtmlBuilder)1 ArrayList (java.util.ArrayList)1 Date (java.util.Date)1 GregorianCalendar (java.util.GregorianCalendar)1 AddTarget (org.activityinfo.legacy.shared.command.AddTarget)1