BillableHoursWebApp.Api.Tests.ControllerTests.ProjectsControllerTests.ReturnBadRequestWhenProjectIsNotCompleteGetInvoiceFromFinalizedProjectGetAction C# (CSharp) Method

ReturnBadRequestWhenProjectIsNotCompleteGetInvoiceFromFinalizedProjectGetAction() private method

        public void ReturnBadRequestWhenProjectIsNotCompleteGetInvoiceFromFinalizedProjectGetAction()
        {
            this.controller
                .Calling(c => c.GetInvoiceFromFinalizedProject(15))
                .ShouldHave()
                .ActionAttributes(attr => attr.ChangingRouteTo("~/api/projects/complete/{id}"))
                .AndAlso()
                .ShouldHave()
                .ActionAttributes(attr => attr.RestrictingForRequestsWithMethod(HttpMethod.Get))
                .AndAlso()
                .ShouldHave()
                .ActionAttributes(attr => attr.RestrictingForAuthorizedRequests())
                .AndAlso()
                .ShouldReturn()
                .BadRequest()
                .WithErrorMessage("Project is not finished yet.");
        }