Ejemplo n.º 1
0
            public async Task WhenGetRelationshipGetsCalled()
            {
                Setup();

                AuthService.Setup(service => service.AuthorizeSelf(It.IsAny <string>(), It.IsAny <Guid>())).Returns(false);

                _result = await RelationshipsController.GetRelationship(_userOneId, _userTwoId, RelationshipTypeId);
            }
Ejemplo n.º 2
0
            public async Task WhenGetRelationshipGetsCalled()
            {
                Setup();

                AuthService.Setup(service => service.AuthorizeSelf(It.IsAny <string>(), It.IsAny <Guid>())).Returns(true);
                RelationshipsRepository.Setup(repository => repository
                                              .GetRelationshipByIdsAndType(It.IsAny <Guid>(), It.IsAny <Guid>(), It.IsAny <RelationshipType>()))
                .ReturnsAsync((Relationship)null);

                _result = await RelationshipsController.GetRelationship(_userOneId, _userTwoId, RelationshipTypeId);
            }