Ejemplo n.º 1
0
        public async Task DeleteAsync(Guid taskId)
        {
            await AuthoriseAsync(_client, _authenticationService);

            var response = await _client.DeleteAsync(TaskUrls.DeleteTaskUrl(taskId));

            await _proxyHelper.ProcessResponseAsync(response, this);
        }
Ejemplo n.º 2
0
        public async Task DeleteAsync_Always_DeletesTask()
        {
            //Arrange
            var sut = CreateSut();

            SetupAuthentication();

            var id = Guid.NewGuid();

            var response = new Mock <IHttpResponse>();

            Mocker.GetMock <IHttpClient>()
            .Setup(o => o.DeleteAsync(TaskUrls.DeleteTaskUrl(id)))
            .ReturnsAsync(response.Object);

            //Act
            await sut.DeleteAsync(id);

            //Assert
            VerifyAuthorisation();
            Mocker.GetMock <IProxyHelper>()
            .Verify(o => o.ProcessResponseAsync(response.Object, sut));
        }