Search in sources :

Example 11 with UpdatePartner

use of org.activityinfo.legacy.shared.command.UpdatePartner 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 UpdatePartner(1, newPartner));
    Assert.assertTrue(cr instanceof DuplicateCreateResult);
}
Also used : DuplicateCreateResult(org.activityinfo.legacy.shared.command.result.DuplicateCreateResult) PartnerDTO(org.activityinfo.legacy.shared.model.PartnerDTO) CreateResult(org.activityinfo.legacy.shared.command.result.CreateResult) DuplicateCreateResult(org.activityinfo.legacy.shared.command.result.DuplicateCreateResult) UpdatePartner(org.activityinfo.legacy.shared.command.UpdatePartner)

Aggregations

UpdatePartner (org.activityinfo.legacy.shared.command.UpdatePartner)11 CreateResult (org.activityinfo.legacy.shared.command.result.CreateResult)7 DuplicateCreateResult (org.activityinfo.legacy.shared.command.result.DuplicateCreateResult)7 PartnerDTO (org.activityinfo.legacy.shared.model.PartnerDTO)5 GetSchema (org.activityinfo.legacy.shared.command.GetSchema)4 Test (org.junit.Test)4 Partner (org.activityinfo.server.database.hibernate.entity.Partner)3 Date (java.util.Date)2 SchemaDTO (org.activityinfo.legacy.shared.model.SchemaDTO)2 AsyncCallback (com.google.gwt.user.client.rpc.AsyncCallback)1 Optional (java.util.Optional)1 InjectionSupport (org.activityinfo.fixtures.InjectionSupport)1 GetSites (org.activityinfo.legacy.shared.command.GetSites)1 GetUsers (org.activityinfo.legacy.shared.command.GetUsers)1 UserResult (org.activityinfo.legacy.shared.command.result.UserResult)1 org.activityinfo.legacy.shared.model (org.activityinfo.legacy.shared.model)1 CommandTestCase2 (org.activityinfo.server.command.CommandTestCase2)1 UpdatePartnerHandler (org.activityinfo.server.command.handler.UpdatePartnerHandler)1 OnDataSet (org.activityinfo.server.database.OnDataSet)1 Database (org.activityinfo.server.database.hibernate.entity.Database)1