コード例 #1
0
 @Before
 public void setUp() {
   objJPAEdmReferentialConstraintTest = new JPAEdmReferentialConstraintTest();
   objJPAEdmReferentialConstraint =
       new JPAEdmReferentialConstraint(
           objJPAEdmReferentialConstraintTest,
           objJPAEdmReferentialConstraintTest,
           objJPAEdmReferentialConstraintTest);
   try {
     objJPAEdmReferentialConstraint.getBuilder().build();
   } catch (ODataJPAModelException e) {
     fail(
         ODataJPATestConstants.EXCEPTION_MSG_PART_1
             + e.getMessage()
             + ODataJPATestConstants.EXCEPTION_MSG_PART_2);
   } catch (ODataJPARuntimeException e) {
     fail(
         ODataJPATestConstants.EXCEPTION_MSG_PART_1
             + e.getMessage()
             + ODataJPATestConstants.EXCEPTION_MSG_PART_2);
   }
 }
コード例 #2
0
 @Test
 public void testIsExistsTrue() {
   objJPAEdmReferentialConstraintTest = new JPAEdmReferentialConstraintTest();
   objJPAEdmReferentialConstraint =
       new JPAEdmReferentialConstraint(
           objJPAEdmReferentialConstraintTest,
           objJPAEdmReferentialConstraintTest,
           objJPAEdmReferentialConstraintTest);
   try {
     objJPAEdmReferentialConstraint.getBuilder().build();
     objJPAEdmReferentialConstraint.getBuilder().build();
   } catch (ODataJPAModelException e) {
     fail(
         ODataJPATestConstants.EXCEPTION_MSG_PART_1
             + e.getMessage()
             + ODataJPATestConstants.EXCEPTION_MSG_PART_2);
   } catch (ODataJPARuntimeException e) {
     fail(
         ODataJPATestConstants.EXCEPTION_MSG_PART_1
             + e.getMessage()
             + ODataJPATestConstants.EXCEPTION_MSG_PART_2);
   }
   assertTrue(objJPAEdmReferentialConstraint.isExists());
 }