public void Test_IsManyToOne_WhenIsSingleRelationship_SetOneToOneSetToTrue_ShouldReturnFalse() { //---------------Set up test pack------------------- var singleRelationshipDef = new FakeSingleRelationshipDef(); singleRelationshipDef.SetAsOneToOne(); IRelationshipDef relationshipDef = singleRelationshipDef; //---------------Assert Precondition---------------- Assert.IsInstanceOf(typeof(SingleRelationshipDef), relationshipDef); //---------------Execute Test ---------------------- bool isManyToOne = relationshipDef.IsManyToOne; //---------------Test Result ----------------------- Assert.IsFalse(isManyToOne); }
public void Test_IsOneToOne_WhenNoRevRelTypeLoaded_SetOneToOneSetToTrue_ShouldReturnTrue_Bug944() { //---------------Set up test pack------------------- var singleRelationshipDef = new FakeSingleRelationshipDef { ReverseRelationshipName = GetRandomString() }; singleRelationshipDef.SetAsOneToOne(); IRelationshipDef relationshipDef = singleRelationshipDef; //---------------Assert Precondition---------------- Assert.IsInstanceOf(typeof(SingleRelationshipDef), relationshipDef); Assert.IsNotNullOrEmpty(relationshipDef.ReverseRelationshipName); //---------------Execute Test ---------------------- bool isOneToOne = relationshipDef.IsOneToOne; //---------------Test Result ----------------------- Assert.IsTrue(isOneToOne); }
public void Test_IsOneToOne_WhenIsSingleRelationship_SetOneToOneSetToTrue_ShouldReturnTrue() { //---------------Set up test pack------------------- var singleRelationshipDef = new FakeSingleRelationshipDef(); singleRelationshipDef.SetAsOneToOne(); IRelationshipDef relationshipDef = singleRelationshipDef; //---------------Assert Precondition---------------- Assert.IsInstanceOf(typeof(SingleRelationshipDef), relationshipDef); //---------------Execute Test ---------------------- bool isOneToOne = relationshipDef.IsOneToOne; //---------------Test Result ----------------------- Assert.IsTrue(isOneToOne); }
public void Test_IsOneToOne_WhenNoRevRelTypeLoaded_SetOneToOneSetToTrue_ShouldReturnTrue_Bug944() { //---------------Set up test pack------------------- var singleRelationshipDef = new FakeSingleRelationshipDef { ReverseRelationshipName = GetRandomString() }; singleRelationshipDef.SetAsOneToOne(); IRelationshipDef relationshipDef = singleRelationshipDef; //---------------Assert Precondition---------------- Assert.IsInstanceOf(typeof(SingleRelationshipDef), relationshipDef); Assert.IsNotNullOrEmpty(relationshipDef.ReverseRelationshipName); //---------------Execute Test ---------------------- bool isOneToOne = relationshipDef.IsOneToOne; //---------------Test Result ----------------------- Assert.IsTrue(isOneToOne); }