use of org.springframework.integration.jpa.test.entity.StudentDomain in project spring-integration by spring-projects.
the class JpaOutboundGatewayTests method getStudent.
@Test
public void getStudent() {
final StudentDomain student = studentService.getStudent(1001L);
Assert.assertNotNull(student);
}
use of org.springframework.integration.jpa.test.entity.StudentDomain in project spring-integration by spring-projects.
the class JpaOutboundGatewayTests method getStudentStudentWithPositionalParameters.
@Test
public void getStudentStudentWithPositionalParameters() {
StudentDomain student = studentService.getStudentWithParameters("First Two");
Assert.assertEquals("First Two", student.getFirstName());
Assert.assertEquals("Last Two", student.getLastName());
}
use of org.springframework.integration.jpa.test.entity.StudentDomain in project spring-integration by spring-projects.
the class JpaOutboundGatewayTests method deleteNonExistingStudent.
@Test
public void deleteNonExistingStudent() {
StudentDomain student = JpaTestUtils.getTestStudent();
student.setRollNumber(3424234234L);
try {
studentService.deleteStudent(student);
} catch (IllegalArgumentException e) {
return;
}
Assert.fail("Was expecting a MessageHandlingException to be thrown.");
}
use of org.springframework.integration.jpa.test.entity.StudentDomain in project spring-integration by spring-projects.
the class JpaOutboundGatewayTests method testRetrievingGatewayInsideChain.
@Test
public void testRetrievingGatewayInsideChain() {
final StudentDomain student = studentService.getStudent2(1001L);
Assert.assertNotNull(student);
}
use of org.springframework.integration.jpa.test.entity.StudentDomain in project spring-integration by spring-projects.
the class JpaOutboundGatewayTests method testUpdatingGatewayInsideChain.
@Test
@Transactional
public void testUpdatingGatewayInsideChain() {
final StudentDomain studentToPersist = JpaTestUtils.getTestStudent();
Assert.assertNull(studentToPersist.getRollNumber());
final StudentDomain persistedStudent = studentService.persistStudent2(studentToPersist);
Assert.assertNotNull(persistedStudent);
Assert.assertNotNull(persistedStudent.getRollNumber());
}
Aggregations