use of cn.taketoday.test.context.junit4.orm.domain.DriversLicense in project spring-framework-debug by Joker-5.
the class HibernateSessionFlushingTests method findSam.
@Test
public void findSam() {
Person sam = personService.findByName(SAM);
assertThat(sam).as("Should be able to find Sam").isNotNull();
DriversLicense driversLicense = sam.getDriversLicense();
assertThat(driversLicense).as("Sam's driver's license should not be null").isNotNull();
assertThat(driversLicense.getNumber()).as("Verifying Sam's driver's license number").isEqualTo(Long.valueOf(1234));
}
use of cn.taketoday.test.context.junit4.orm.domain.DriversLicense in project spring-framework-5.2.9.RELEASE by somepeopleHavingDream.
the class HibernateSessionFlushingTests method findSam.
@Test
public void findSam() {
Person sam = personService.findByName(SAM);
assertThat(sam).as("Should be able to find Sam").isNotNull();
DriversLicense driversLicense = sam.getDriversLicense();
assertThat(driversLicense).as("Sam's driver's license should not be null").isNotNull();
assertThat(driversLicense.getNumber()).as("Verifying Sam's driver's license number").isEqualTo(Long.valueOf(1234));
}
use of cn.taketoday.test.context.junit4.orm.domain.DriversLicense in project today-infrastructure by TAKETODAY.
the class HibernateSessionFlushingTests method saveJuergenWithDriversLicense.
@Test
public void saveJuergenWithDriversLicense() {
DriversLicense driversLicense = new DriversLicense(2L, 2222L);
Person juergen = new Person(JUERGEN, driversLicense);
int numRows = countRowsInTable("person");
personService.save(juergen);
assertThat(countRowsInTable("person")).as("Verifying number of rows in the 'person' table.").isEqualTo((numRows + 1));
Assertions.assertThat(personService.findByName(JUERGEN)).as("Should be able to save and retrieve Juergen").isNotNull();
assertThat(juergen.getId()).as("Juergen's ID should have been set").isNotNull();
}
use of cn.taketoday.test.context.junit4.orm.domain.DriversLicense in project spring-framework by bluecrow1986.
the class HibernateSessionFlushingTests method findSam.
@Test
public void findSam() {
Person sam = personService.findByName(SAM);
assertThat(sam).as("Should be able to find Sam").isNotNull();
DriversLicense driversLicense = sam.getDriversLicense();
assertThat(driversLicense).as("Sam's driver's license should not be null").isNotNull();
assertThat(driversLicense.getNumber()).as("Verifying Sam's driver's license number").isEqualTo(Long.valueOf(1234));
}
use of cn.taketoday.test.context.junit4.orm.domain.DriversLicense in project spring-framework by spring-projects.
the class HibernateSessionFlushingTests method findSam.
@Test
public void findSam() {
Person sam = personService.findByName(SAM);
assertThat(sam).as("Should be able to find Sam").isNotNull();
DriversLicense driversLicense = sam.getDriversLicense();
assertThat(driversLicense).as("Sam's driver's license should not be null").isNotNull();
assertThat(driversLicense.getNumber()).as("Verifying Sam's driver's license number").isEqualTo(Long.valueOf(1234));
}
Aggregations