private ActorRelationship CreateRelationshipRequest(int requestor, int acceptor) { var actorRelationship = new ActorRelationship { RequestorId = requestor, AcceptorId = acceptor }; _relationshipController.CreateRelationshipRequest(actorRelationship); return(actorRelationship); }
public void DoesDeleteRelationshipRequestWhenUserDeleted() { // Arrange var requestor = Helpers.CreateUser($"{nameof(DoesDeleteRelationshipRequestWhenUserDeleted)} Requestor"); var acceptor = Helpers.CreateUser($"{nameof(DoesDeleteRelationshipRequestWhenUserDeleted)} Acceptor"); var relationship = new ActorRelationship { RequestorId = requestor.Id, AcceptorId = acceptor.Id }; _relationshipController.CreateRelationshipRequest(relationship); // Act _userController.Delete(requestor.Id); // Assert var relationships = _relationshipController.GetRelationAcceptorActors(requestor.Id, ActorType.User); Assert.Empty(relationships); }