try { attendToDelete.setEnrolment(null); attendToDelete.delete(); } catch (DomainException e) { fail("Should have been deleted."); }
	public void testDelete() {		setUpForDeleteCase();				try {			attendToDelete.delete();		}		catch (DomainException e) {			fail("Should have been deleted.");		}				try {			attendNotToDelete1.delete();			fail("Should not have been deleted.");		}		catch (DomainException e) {}				try {			attendNotToDelete2.delete();			fail("Should not have been deleted.");		}		catch (DomainException e) {}				try {			attendNotToDelete3.delete();			fail("Should not have been deleted.");		}		catch (DomainException e) {}				try {			attendNotToDelete4.delete();			fail("Should not have been deleted.");		}		catch (DomainException e) {}		assertFalse("Failed to dereference Student", attendToDelete.hasAluno());		assertFalse("Failed to dereference Enrolment", attendToDelete.hasEnrolment());		assertFalse("Failed to dereference ExecutionCourse", attendToDelete.hasDisciplinaExecucao());		assertAttendsNotDereferenced(attendNotToDelete1);		assertTrue("Should not dereference StudentGroups", attendNotToDelete1.hasAnyStudentGroups());		assertTrue("Should not dereference Groupings", attendNotToDelete1.hasAnyGroupings());		assertTrue("Should not dereference Mark", attendNotToDelete1.hasAnyAssociatedMarks());				assertAttendsNotDereferenced(attendNotToDelete2);		assertTrue("Should not dereference StudentGroups", attendNotToDelete2.hasAnyStudentGroups());				assertAttendsNotDereferenced(attendNotToDelete3);		assertTrue("Should not dereference Groupings", attendNotToDelete3.hasAnyGroupings());				assertAttendsNotDereferenced(attendNotToDelete4);		assertTrue("Should not dereference Mark", attendNotToDelete4.hasAnyAssociatedMarks());	}