Package org.martinlaw.bo

Examples of org.martinlaw.bo.MatterAnnexType


    RouteContext context = mock(RouteContext.class);
    DocumentRouteHeaderValue docHdr = mock(DocumentRouteHeaderValue.class);
    when(context.getDocument()).thenReturn(docHdr);
   
    MatterWork work = mock(MatterWork.class);
    MatterAnnexType annexType = new MatterAnnexType();
    when(work.getAnnexType()).thenReturn(annexType);
   
    final String documentId = "2013";
    when(docHdr.getDocumentId()).thenReturn(documentId);
    when(boSvc.findBySinglePrimaryKey(same(MatterWork.class), same(documentId))).thenReturn(work);
    assertTrue("branch list should be empty since requiresApproval is by default false"
        annexTypeApprovalSplit.process(context, null).getBranchNames().isEmpty());
   
    annexType.setRequiresApproval(true);
    final List<String> branchNames = annexTypeApprovalSplit.process(context, null).getBranchNames();
    assertFalse("branch list should not be empty since requiresApproval is set to true", branchNames.isEmpty());
    assertEquals("branch name differs", MartinlawConstants.RoutingBranches.ANNEX_TYPE_APPROVAL, branchNames.get(0));
   
    when(work.getAnnexType()).thenReturn(null);
View Full Code Here


    return "MatterAnnexTypeMaintenanceDocument";
  }

  @Override
  public Type getExpectedOnRetrieve() {
    MatterAnnexType annexType = new MatterAnnexType();
    annexType.setDescription("default annex type -  any document");
    annexType.setName("document");
    annexType.setId(11001l);
   
    return annexType;
  }
View Full Code Here

    return annexType;
  }

  @Override
  protected void populateAdditionalFieldsForCrud(Type type) {
    MatterAnnexType annexType = (MatterAnnexType)type;
    annexType.setRequiresApproval(true);
  }
View Full Code Here

    testCrudCreated(type);
  }

  @Override
  protected void testCrudCreated(Type type) {
    MatterAnnexType annexType = (MatterAnnexType)type;
    assertTrue("requires approval should be true", annexType.getRequiresApproval());
  }
View Full Code Here

TOP

Related Classes of org.martinlaw.bo.MatterAnnexType

Copyright © 2018 www.massapicom. 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.