private void verifyProposalWillBeIncludedInClose( Proposal proposal, ProposalAwardCloseDocument close, boolean verifyProposalClosingDate, boolean verifyProposalSubmissionDate) { if (verifyProposalClosingDate) { assertNull( "Proposal closing date must be null to be included in closing.", proposal.getProposalClosingDate()); } if (verifyProposalSubmissionDate) { assertTrue( "Proposal submission date must be less than or equal to closing last closed date.", proposal.getProposalSubmissionDate().getTime() <= close.getCloseOnOrBeforeDate().getTime()); } }
private Proposal createProposal( Date proposalBeginningDate, Date proposalEndingDate, Date proposalSubmissionDate, Date proposalClosingDate) { // Create and save a proposal Proposal proposal = new Proposal(); proposal.setProposalNumber(NextProposalNumberFinder.getLongValue()); // set required fields proposal.setAgencyNumber("12851"); proposal.setProposalProjectTitle("Testing CG Close Process"); proposal.setProposalBeginningDate(proposalBeginningDate); proposal.setProposalEndingDate(proposalEndingDate); proposal.setProposalDirectCostAmount(new KualiDecimal("3840.00")); proposal.setProposalIndirectCostAmount(new KualiDecimal("2016.00")); proposal.setProposalTotalAmount( proposal.getProposalDirectCostAmount().add(proposal.getProposalIndirectCostAmount())); proposal.setProposalSubmissionDate(proposalSubmissionDate); proposal.setProposalClosingDate(proposalClosingDate); proposal.setProposalAwardTypeCode("N"); proposal.setProposalPurposeCode("C"); return proposal; }