Esempio n. 1
0
 public async Task WhenGetRelationshipGetsCalled()
 {
     Setup();
     AuthService.Setup(service => service.AuthorizeSelf(
                           It.IsAny <string>(), It.IsAny <Guid>())).Returns(false);
     _result = await RelationshipsController.GetRelationships(_userId, RelationshipTypeId);
 }
Esempio n. 2
0
            public async Task WhenGetRelationshipsGetsCalled()
            {
                Setup();

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

                _result = await RelationshipsController.GetRelationships(_userId, RelationshipTypeId);
            }