public async Task ShouldReturnNotFound()
        {
            var result = (await _solutionsController.Dashboard(SolutionId).ConfigureAwait(false)).Result as ObjectResult;

            result.StatusCode.Should().Be((int)HttpStatusCode.OK);
            (result.Value as SolutionDashboardResult).Id.Should().BeNull();
        }
Exemplo n.º 2
0
        public async Task ShouldReturnNotFound()
        {
            var result = (await _solutionsController.Dashboard(SolutionId).ConfigureAwait(false)).Result as NotFoundResult;

            result.StatusCode.Should().Be((int)HttpStatusCode.NotFound);

            _mockMediator.Verify(
                m => m.Send(It.Is <GetSolutionByIdQuery>(q => q.Id == SolutionId), It.IsAny <CancellationToken>()), Times.Once);
        }
        public async Task ShouldReturnNotFound()
        {
            var result = (await solutionsController.Dashboard(SolutionId)).Result as ObjectResult;

            Assert.NotNull(result);
            result.StatusCode.Should().Be(StatusCodes.Status200OK);

            result.Value.Should().BeOfType <SolutionDashboardResult>();
            result.Value.As <SolutionDashboardResult>().Id.Should().BeNull();
        }