Examples of MatterConsideration


Examples of org.martinlaw.bo.MatterConsideration

   * @throws IllegalAccessException
   * @throws InstantiationException
   */
  @Test(expected = DataIntegrityViolationException.class)
  public void testMatterConsiderationNullableFields() throws InstantiationException, IllegalAccessException {
    MatterConsideration consideration = getDataObjectClass().newInstance();
    getBoSvc().save(consideration);
  }
View Full Code Here

Examples of org.martinlaw.bo.MatterConsideration

   * tests that the consideration inserted via sql can be retrieved ok
   */
  @Test
  public void testMatterConsiderationRetrieve() {
    // retrieve object populated via sql script
    MatterConsideration consideration = getBoSvc().findBySinglePrimaryKey(
        getDataObjectClass(), 1001l);
    getTestUtils().testRetrievedConsiderationFields(consideration);
  }
View Full Code Here

Examples of org.martinlaw.bo.MatterConsideration

   */
  @Test
  public void testMatterConsiderationCRUD()
      throws InstantiationException, IllegalAccessException {
    // CR
    MatterConsideration consideration = getTestUtils().getTestConsideration();
    getBoSvc().save(consideration);
    //getTestUtils().testConsiderationCRUD(consideration);
    // U
    consideration.refresh();
    final String currency = "ETB";
    consideration.setCurrency(currency);
    final String description = "lapset contract fees";
    consideration.setDescription(description);
    getBoSvc().save(consideration);
    consideration = getBoSvc().findBySinglePrimaryKey(getDataObjectClass(), consideration.getId());
    assertEquals("currency differs", currency, consideration.getCurrency());
    assertEquals("description differs", description, consideration.getDescription());
    //D
    getBoSvc().delete(consideration);
    assertNull("consideration should have been deleted",
        getBoSvc().findBySinglePrimaryKey(getDataObjectClass(), consideration.getId()));
  }
View Full Code Here

Examples of org.martinlaw.bo.MatterConsideration

*/
public class ConsiderationTypeKeyValuesTest extends ScopedKeyValuesUifTestBase {

  @Override
  protected MatterExtensionHelper getTestDataObject() {
    return new MatterConsideration();
  }
View Full Code Here

Examples of org.martinlaw.bo.MatterConsideration

    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.MatterConsideration

   *
   */
  @Test
  public void testMatterConsiderationRouting() throws InstantiationException,
      IllegalAccessException, WorkflowException {
    MatterConsideration consideration = getTestUtils().getTestConsideration();
    this.testMaintenanceRoutingInitToFinal(getDocTypeName(), consideration);
  }
View Full Code Here

Examples of org.martinlaw.bo.MatterConsideration

   */
  @Test(expected = ValidationException.class)
  public void testMatterConsiderationRouting_InvalidMatterId()
      throws InstantiationException, IllegalAccessException,
      WorkflowException {
    MatterConsideration consideration = getTestUtils().getTestConsideration();
    consideration.setMatterId(3000l);
   
    /*//initiate as the clerk
    Document doc = getPopulatedMaintenanceDocument(getDocType(), testDate, "clerk1");
    KRADServiceLocatorWeb.getDocumentService().saveDocument(doc);*/
    testMaintenanceRoutingInitToFinal(getDocTypeName(), consideration);
View Full Code Here

Examples of org.martinlaw.bo.MatterConsideration

   */
  @Test
  public void testMatterConsiderationRouting_required_validated_onroute()
      throws InstantiationException, WorkflowException,
      IllegalAccessException {
    MatterConsideration consideration = getTestUtils().getTestConsideration();
    // required on route
    consideration.setAmount(null);
    consideration.setCurrency(null);
   
    //initiate as the clerk
    Document doc = getPopulatedMaintenanceDocument(getDocTypeName(), consideration, "clerk1");
    testRouting_required_validated_onroute(doc);
  }
View Full Code Here

Examples of org.martinlaw.bo.MatterConsideration

  @Test
  public void testMatterConsideration_doc_search() {
    try {
      // route 2 docs first
      MatterConsideration consideration1 = getTestUtils().getTestConsideration();
      final String docType = getDocTypeName();
      testMaintenanceRoutingInitToFinal(docType, consideration1);
     
      MatterConsideration consideration2 = getTestUtils().getTestConsideration();
      consideration2.setAmount(new BigDecimal(7500));
      consideration2.setConsiderationTypeId(10004l);
      testMaintenanceRoutingInitToFinal(docType, consideration2);
     
     
      // blank document search
      SearchTestCriteria crit1 = new SearchTestCriteria();
View Full Code Here

Examples of org.martinlaw.bo.MatterConsideration

      if (doc.isMatterIdValid()) {
        Matter matter = KRADServiceLocator.getBusinessObjectService().findBySinglePrimaryKey(
            Matter.class, doc.getMatterId());
        if (matter.getConsiderations() != null && !matter.getConsiderations().isEmpty()) {
          for (Object considObj: matter.getConsiderations()) {
            MatterConsideration consideration = (MatterConsideration)considObj;
            StringBuilder value = new StringBuilder();
            value.append(consideration.getConsiderationType().getName());
            value.append(" - ");
            value.append(consideration.getCurrency());
            value.append(" - ");
            value.append(consideration.getAmount());
            keyValues.add(new ConcreteKeyValue(String.valueOf(consideration.getId()), value.toString()));
          }
        }
      }
    }
    return keyValues;
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.