Example #1
0
        public async Task ThenIShouldGetBackABadRequestIfACompanyCannotBeFound()
        {
            //Assign
            var request = new SelectEmployerViewModel
            {
                EmployerRef = "251643"
            };

            _mediator.Setup(x => x.SendAsync(It.IsAny <GetEmployerInformationRequest>())).ReturnsAsync(null);

            //Act
            var response = await _employerAccountOrchestrator.GetCompanyDetails(request);

            //Assert
            Assert.AreEqual(HttpStatusCode.BadRequest, response.Status);
            _mediator.Verify(x => x.SendAsync(It.Is <GetEmployerInformationRequest>(info => info.Id.Equals(request.EmployerRef))));
        }