Search in sources :

Example 36 with CreateResult

use of org.activityinfo.shared.command.result.CreateResult in project activityinfo by bedatadriven.

the class PartnerTest method testAddDuplicatePartner.

public void testAddDuplicatePartner() throws Exception {
    PartnerDTO newPartner = new PartnerDTO();
    newPartner.setName("NRC");
    newPartner.setFullName("Norweigen Refugee Committe");
    CreateResult cr = execute(new AddPartner(1, newPartner));
    Assert.assertTrue(cr instanceof DuplicateCreateResult);
}
Also used : DuplicateCreateResult(org.activityinfo.shared.command.result.DuplicateCreateResult) PartnerDTO(org.activityinfo.shared.dto.PartnerDTO) CreateResult(org.activityinfo.shared.command.result.CreateResult) DuplicateCreateResult(org.activityinfo.shared.command.result.DuplicateCreateResult) AddPartner(org.activityinfo.shared.command.AddPartner)

Aggregations

CreateResult (org.activityinfo.shared.command.result.CreateResult)36 Test (org.junit.Test)17 SchemaDTO (org.activityinfo.shared.dto.SchemaDTO)9 Date (java.util.Date)8 GetSchema (org.activityinfo.shared.command.GetSchema)8 PartnerDTO (org.activityinfo.shared.dto.PartnerDTO)8 CreateSite (org.activityinfo.shared.command.CreateSite)7 SiteDTO (org.activityinfo.shared.dto.SiteDTO)7 AddPartner (org.activityinfo.shared.command.AddPartner)6 ActivityDTO (org.activityinfo.shared.dto.ActivityDTO)6 ProjectDTO (org.activityinfo.shared.dto.ProjectDTO)6 OnDataSet (org.activityinfo.server.database.OnDataSet)5 UserDatabase (org.activityinfo.server.database.hibernate.entity.UserDatabase)5 CreateEntity (org.activityinfo.shared.command.CreateEntity)5 DuplicateCreateResult (org.activityinfo.shared.command.result.DuplicateCreateResult)5 AsyncCallback (com.google.gwt.user.client.rpc.AsyncCallback)4 FormDialogCallback (org.activityinfo.client.page.common.dialog.FormDialogCallback)4 FormDialogTether (org.activityinfo.client.page.common.dialog.FormDialogTether)4 Activity (org.activityinfo.server.database.hibernate.entity.Activity)4 AddTarget (org.activityinfo.shared.command.AddTarget)4