public void WhenAssociatingAnEntity_ItsRelatedEntityNameShouldBePartOfTheAssociation() { var testEntityToBeAssociated = new TestEntityToBeAssociated(); var testAssociatedEntity = new TestAssociatedEntity(); var association = Associate.ThisEntity(testEntityToBeAssociated) .With(testAssociatedEntity); Assert.Equal("test_associatedentity", association.RelatedEntities.Single().Value); }
public void WhenAssociatingAnEntity_ItsIdShouldBePartOfTheAssociation() { var testEntityToBeAssociated = new TestEntityToBeAssociated(); var testAssociatedEntity = new TestAssociatedEntity(); var association = Associate.ThisEntity(testEntityToBeAssociated) .With(testAssociatedEntity); Assert.Equal(testEntityToBeAssociated.Id, association.EntityId); }
public void WhenAssociatingAnEntity_ItsEntityNameShouldBePartOfTheAssociation() { var testEntityToBeAssociated = new TestEntityToBeAssociated(); var testAssociatedEntity = new TestAssociatedEntity(); var association = Associate.ThisEntity(testEntityToBeAssociated) .With(testAssociatedEntity); Assert.Equal("test_entitytobeassociated", association.EntityName); }