public async Task Then_GetStandardOptionsList(GetStandardsListResult queryResult, [Frozen] Mock <IMediator> mockMediator, [Greedy] OptionsController controller) { mockMediator .Setup(mediator => mediator.Send(It.Is <GetStandardsListQuery>(query => query.Filter.Equals(StandardFilter.Active)), It.IsAny <CancellationToken>())) .ReturnsAsync(queryResult); var controllerResponse = await controller.GetStandardOptionsList() as ObjectResult; var model = controllerResponse.Value as GetStandardOptionsListResponse; controllerResponse.StatusCode.Should().Be((int)HttpStatusCode.OK); model.StandardOptions.Should().BeEquivalentTo(queryResult.Standards.Select(standard => new GetStandardOptionsResponse { StandardUId = standard.StandardUId, IfateReferenceNumber = standard.IfateReferenceNumber, LarsCode = standard.LarsCode, Version = standard.Version, Options = standard.Options }).ToList()); }