Esempio n. 1
0
            public async Task WhenAcceptRequestsGetCalled()
            {
                Setup();

                AuthService.Setup(service => service.AuthorizeSelf(It.IsAny <string>(), It.IsAny <Guid>())).Returns(true);
                RequestValidator.Setup(validator => validator.ValidateAcceptRequest(It.IsAny <Request>())).ReturnsAsync(new List <Error>());

                _result = await RequestsController.AcceptRequest(_userId, _senderId, RequestTypeId);
            }
Esempio n. 2
0
            public async Task WhenSendFriendRequestGetsCalled()
            {
                Setup();

                var fixture = new Fixture();

                _requestRequest = fixture.Create <RequestRequest>();

                AuthService.Setup(service => service.AuthorizeSelf(It.IsAny <string>(), It.IsAny <Guid>())).Returns(true);
                RequestValidator.Setup(validator => validator.ValidateNewRequest(It.IsAny <Request>()))
                .ReturnsAsync(new List <Error>());

                _result = await RequestsController.SendRequest(_requestRequest);
            }