Examples of MatterClient


Examples of org.martinlaw.bo.MatterClient

  /**
   * tests CRUD ops
   */
  @Test
  public void testMatterClientCRUD() {
    MatterClient person = new MatterClient();
    person.setMatterId(1001l);
    testMartinlawPersonCRUD(MatterClient.class, "client1", person);
  }
View Full Code Here

Examples of org.martinlaw.bo.MatterClient

  /**
   * tests that required fields are validated by the database
   */
  @Test(expected = DataIntegrityViolationException.class)
  public void testCaseMatterClientNullableFields() {
    MatterClient caseClient = new MatterClient();
    getBoSvc().save(caseClient);
  }
View Full Code Here

Examples of org.martinlaw.bo.MatterClient

    // when(doc.getMatterClass()).thenCallRealMethod();
    when(doc.isMatterIdValid()).thenReturn(true);
   
    //prepare the matter and clients
    kase = new CourtCase();
    MatterClient c1 = mock(MatterClient.class);
    when(c1.getPrincipalName()).thenReturn("signum");
    Person cp1 = mock(Person.class);
    when(cp1.getName()).thenReturn("Simon Gitahi");
    when(c1.getPerson()).thenReturn(cp1);
    kase.getClients().add(c1);
    MatterClient c2 = mock(MatterClient.class);
    when(c2.getPrincipalName()).thenReturn("mlaw");
    Person cp2 = mock(Person.class);
    when(cp2.getName()).thenReturn("Martin Mungai");
    when(c2.getPerson()).thenReturn(cp2);
    kase.getClients().add(c2);
   
    // prepare consideration
    consideration = new MatterConsideration();
    consideration.setMatter(kase);
View Full Code Here

Examples of org.martinlaw.bo.MatterClient

   */
  public void testConveyanceCRUD() {
    // C
    Conveyance conv = getTestUtils().getTestConveyance();
    // add client
    MatterClient client = new MatterClient();
    String principalName = "clientX";
    client.setPrincipalName(principalName);
    conv.getClients().add(client);

    getBoSvc().save(conv);
   
    // R
View Full Code Here

Examples of org.martinlaw.bo.MatterClient

      assertNotNull("status should not be null", matter.getStatus());
      assertEquals("status differs", "hearing", matter.getStatus().getName());
      // case client
      List<MatterClient> clients = matter.getClients();
      assertEquals("number of clients differs", 2, clients.size());
      MatterClient client = clients.get(0);
      assertEquals("client principal name differs", "client1", client.getPrincipalName());
      assertEquals("client first name differs", "Client", client.getPerson().getFirstName());
      // event
      List<MatterEvent> dates = matter.getEvents();
      assertEquals("number of dates differs", 1, dates.size());
      getTestUtils().testRetrievedMatterEventFields(matter.getEvents().get(0));
      // attachments
View Full Code Here

Examples of org.martinlaw.bo.MatterClient

        matter = ((MatterConsideration) form.getDataObject()).getMatter();
      }
    }
    if (matter != null && matter.getClients() != null && !matter.getClients().isEmpty()) {
      for (Object clientObj: matter.getClients()) {
        MatterClient client = (MatterClient)clientObj;
        String value = client.getPerson().getName();
        if (StringUtils.isEmpty(value)) {
          value = client.getPrincipalName();
        }
        keyValues.add(new ConcreteKeyValue(client.getPrincipalName(), value));
      }
    }
    return keyValues;
  }
View Full Code Here

Examples of org.martinlaw.bo.MatterClient

  public void testCourtCaseRouting_required_collection_validated_onroute()
      throws InstantiationException, WorkflowException,
      IllegalAccessException {
        Matter courtCase = getTestMatter();
        // create client with blank name and add to collection
        MatterClient client = new MatterClient();
        client.setPrincipalName(null);
        courtCase.getClients().add(client);
        //initiate as the clerk
        Document doc = getPopulatedMaintenanceDocument(getDocTypeName(), courtCase, "clerk1");
        testRouting_required_validated_onroute(doc);
      }
View Full Code Here

Examples of org.martinlaw.bo.MatterClient

   * add test clients to a matter
   * @param kase
   */
  public void addClients(Matter kase) {
    //create and save client, witness
    MatterClient cl1 = new MatterClient();
    cl1.setMatterId(kase.getId());
    cl1.setPrincipalName("Joseph Ndungu");
    MatterClient cl2 = new MatterClient();
    cl2.setMatterId(kase.getId());
    cl2.setPrincipalName("Joseph Thube");

    kase.getClients().add(cl1);
    kase.getClients().add(cl2);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.