Search in sources :

Example 6 with AddPartner

use of org.activityinfo.shared.command.AddPartner 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

AddPartner (org.activityinfo.shared.command.AddPartner)6 CreateResult (org.activityinfo.shared.command.result.CreateResult)6 DuplicateCreateResult (org.activityinfo.shared.command.result.DuplicateCreateResult)5 PartnerDTO (org.activityinfo.shared.dto.PartnerDTO)5 Test (org.junit.Test)3 Date (java.util.Date)2 GetSchema (org.activityinfo.shared.command.GetSchema)2 SchemaDTO (org.activityinfo.shared.dto.SchemaDTO)2 AsyncCallback (com.google.gwt.user.client.rpc.AsyncCallback)1 FormDialogCallback (org.activityinfo.client.page.common.dialog.FormDialogCallback)1 FormDialogTether (org.activityinfo.client.page.common.dialog.FormDialogTether)1 OnDataSet (org.activityinfo.server.database.OnDataSet)1 Partner (org.activityinfo.server.database.hibernate.entity.Partner)1 UserDatabase (org.activityinfo.server.database.hibernate.entity.UserDatabase)1 UserPermission (org.activityinfo.server.database.hibernate.entity.UserPermission)1 CreateSite (org.activityinfo.shared.command.CreateSite)1 RemovePartner (org.activityinfo.shared.command.RemovePartner)1 SiteResult (org.activityinfo.shared.command.result.SiteResult)1 SiteDTO (org.activityinfo.shared.dto.SiteDTO)1 IllegalAccessCommandException (org.activityinfo.shared.exception.IllegalAccessCommandException)1