Added some comments and saved after editing a period.
This commit is contained in:
parent
20b1d10219
commit
5cd64a9eea
@ -304,11 +304,11 @@ should NOT overlap. */
|
||||
|
||||
/* Test for checking if it possible to edit an application period: first create bachelor-application period and save it,
|
||||
then try to edit the new period by adding a "master" class and changing end date,
|
||||
it should NOT overlap (itself) even if the start or end date and/or project class are the same */
|
||||
it should NOT overlap (itself), even if the start or end date and/or project class are the same */
|
||||
@Test
|
||||
@Transactional
|
||||
@Rollback
|
||||
public void notOverlappingWhenEditing() {
|
||||
public void notOverlapWhenEditing() {
|
||||
cleanUpDatabase();
|
||||
Set<ProjectClass> myBachelorSet = new HashSet<ProjectClass>();
|
||||
myBachelorSet.add(bachelor);
|
||||
@ -323,11 +323,13 @@ should NOT overlap. */
|
||||
cal.set(2012, Calendar.MAY, 2);
|
||||
final Date changedEndDate = cal.getTime();
|
||||
applicationPeriod1.setEndDate(changedEndDate);
|
||||
// save the changes
|
||||
applicationPeriodDao.save(applicationPeriod1);
|
||||
boolean periodOverlap = applicationPeriodFacade.doesPeriodOverlap(applicationPeriod1);
|
||||
Assert.assertFalse(periodOverlap); // should NOT overlap
|
||||
}
|
||||
|
||||
/*same time periods, with different project classes, should NOT overlap */
|
||||
/* same time periods, with different project classes, should NOT overlap */
|
||||
@Test
|
||||
@Transactional
|
||||
@Rollback
|
||||
@ -351,7 +353,7 @@ should NOT overlap. */
|
||||
}
|
||||
|
||||
|
||||
/* one long time period, with same project classes, shorter time periods within this long time period should overlap */
|
||||
/* one long time period, a shorter time period within this long time period should overlap when the project class is the same */
|
||||
@Test
|
||||
@Transactional
|
||||
@Rollback
|
||||
@ -374,7 +376,7 @@ should NOT overlap. */
|
||||
}
|
||||
|
||||
|
||||
/* the same time periods, with different sets of project classes, but when one of the project classes overlaps, should overlap */
|
||||
/* the same time periods, with different sets of project classes, should overlap */
|
||||
@Test
|
||||
@Transactional
|
||||
@Rollback
|
||||
|
Loading…
x
Reference in New Issue
Block a user