public async Task ListsAlerts(int propertyAlertCount, int personAlertCount) { // Arrange string expectedPropertyReference = new Faker().Random.Number().ToString(); AlertList alertList = new AlertList { PropertyAlerts = StubPropertyAlertList(expectedPropertyReference, propertyAlertCount), PersonAlerts = new PersonAlertList { Alerts = StubAlerts().Generate(personAlertCount) } }; _listAlertsUseCaseMock.Setup(m => m.ExecuteAsync(It.IsAny <string>())).ReturnsAsync(alertList); // Act var result = await _classUnderTest.ListCautionaryAlerts(expectedPropertyReference); var alertResult = GetResultData <CautionaryAlertResponseList>(result); var statusCode = GetStatusCode(result); // Assert statusCode.Should().Be(200); alertResult.LocationAlert.Should().HaveCount(propertyAlertCount); alertResult.PersonAlert.Should().HaveCount(personAlertCount); alertResult.PropertyReference.Should().Be(expectedPropertyReference); }