Package org.apache.isis.example.application.claims.dom.claim

Examples of org.apache.isis.example.application.claims.dom.claim.Claim.submit()


    @Test
    public void cannotSubmitTwice() throws Exception {
        final Claim tomsSubmittedClaim = tomsSubmittedClaim();
        try {
            final Approver approver = tomEmployee.getDefaultApprover();
            tomsSubmittedClaim.submit(approver);
            fail("Should not be able to submit again");
        } catch (final DisabledException e) {
            assertThat(e.getMessage(), Matchers.containsString("Claim has already been submitted"));
        }
    }
View Full Code Here


    }

    private Claim tomsSubmittedClaim() {
        final List<Claim> tomsClaims = claimRepository.claimsFor(tomEmployee);
        final Claim tomsClaim1 = tomsClaims.get(0);
        tomsClaim1.submit(tomEmployee.getDefaultApprover());
        assertThat(tomsClaim1.getStatus(), is("Submitted"));
        return wrapped(tomsClaim1);
    }

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