This will create a Part object and a few related Item objects.
The delete of the Part object will implicitly delete the related Item objects too.
Note: Part has a '1 - to - 0..* composition' relationship with Item.
testCascadeDeleteOfOptionalOneObject
public void testCascadeDeleteOfOptionalOneObject()(Code)
This will create a Part object and a related PartPicture object.
The delete of the Part object will implicitly delete the PartPicture object too.
Note: Part has a '1 - to - 0..1 composition' relationship with PartPicture.
testMandatoryOneObjectUntouchedOnDelete
public void testMandatoryOneObjectUntouchedOnDelete()(Code)
This will create a PartRemarks object and then delete it. The delete should not affect the related Part object.
Note: PartRemarks has a '0..1 - to - 1 association' relationship with PartPicture.
This will create a Part object. It should be proceed successfully without the need for an Item object.
Note: Part has a '1 - to - 0..* composition' relationship with Item.
testNonValidationOfOptionalOneObject
public void testNonValidationOfOptionalOneObject()(Code)
This will create a Part object. It should proceed successfully without the need for a PartRemarks object.
Note: Part has a '1 - to - 0..1 association' relationship with PartRemarks.
testOneObjectUntouchedOnDelete
public void testOneObjectUntouchedOnDelete()(Code)
This will create a Part object with a related CategoryOfInstrument and then delete the Part. The delete should not affect the related CategoryOfInstrument object.
Note: Part has a '0..* - to - 1 association' relationship with CategoryOfInstrument.
testRestrictConstraintOfManyObject
public void testRestrictConstraintOfManyObject()(Code)
This will create a CategoryOfInstrument object and a few related Part objects.
The delete of the CategoryOfInstrument object will fail, unless the related Part objects are first deleted.
Note: CategoryOfInstrument has a '1 - to - 0..* association' relationship with Part.
testRestrictConstraintOfOptionalOneObject
public void testRestrictConstraintOfOptionalOneObject()(Code)
This will create a Part object and a related PartRemarks object.
The delete of the Part object will fail, unless the PartRemarks is deleted first.
Note: Part has a '1 - to - 0..1 association' relationship with PartRemarks.
testValidationOfMandatoryOneObject
public void testValidationOfMandatoryOneObject()(Code)
This will try to create a PartRemarks object with a non-existent part. It should fail.
However, creating a PartRemarks object with an existent part should be successful.
Note: PartRemarks has a '0..1 - to - 1 association' relationship with PartPicture.
This will try to create a Part object with a non-existent CategoryOfInstrument. It should fail.
However, creating a Part object with an existent CategoryOfInstrument should be successful.
Note: Part has a '0..* - to - 1 association' relationship with CategoryOfInstrument.