Code example for AbstractTransactionalTestNGSpringContextTests

Methods: assertNull

0
 
    @Test 
    public void testGetInvalidId() { 
        CodeReviewComment result = codeReviewCommentDao.get(-567890L); 
 
        assertNull(result); 
    } 
 
    @Test 
    public void testUpdate() { 
        String newUuid = "1234-1231-1231"; 
        CodeReviewComment review = PersistedObjectsFactory.getDefaultCodeReviewComment(); 
        session.save(review); 
        review.setUuid(newUuid); 
 
        codeReviewCommentDao.saveOrUpdate(review); 
        session.flush(); 
        session.evict(review); 
        CodeReviewComment result = (CodeReviewComment) session.get(CodeReviewComment.class, review.getId());