public async Task GetServiceTypesAsync_Returns_GetServiceTypeDtos() { //Arrange _fixture.MockServiceTypeService.Setup(x => x.GetServiceTypesAsync()) .ReturnsAsync(_fixture.ServiceTypes); var repository = new ServiceTypeRepository(AutoMapperSingleton.Mapper, _fixture.MockServiceTypeService.Object); //Act var result = await repository.GetServiceTypesAsync(); //Assert var serviceType = result.Should().BeAssignableTo <IEnumerable <GetServiceTypeDto> >().Subject; serviceType.Should().HaveCount(2); }