public void Test_GetCompulsory_WhenTrue_ShouldReturnRelationshipIsCompulsory() { //---------------Set up test pack------------------- var relationshipDef = new FakeSingleRelationshipDef(); relationshipDef.SetAsCompulsory(); //---------------Assert Precondition---------------- Assert.IsTrue(relationshipDef.IsCompulsory); //---------------Execute Test ---------------------- var compulsory = relationshipDef.Compulsory; //---------------Test Result ----------------------- Assert.IsTrue(compulsory); }
public void Test_SetAsCompulsory_ShouldSetIsCompulsoryTrue() { //---------------Set up test pack------------------- var singleRelationshipDef = new FakeSingleRelationshipDef(); IRelationshipDef relationshipDef = singleRelationshipDef; //---------------Assert Precondition---------------- Assert.IsInstanceOf(typeof(SingleRelationshipDef), relationshipDef); Assert.IsFalse(relationshipDef.IsCompulsory); //---------------Execute Test ---------------------- singleRelationshipDef.SetAsCompulsory(); //---------------Test Result ----------------------- Assert.IsTrue(relationshipDef.IsCompulsory); }