public async Task Get_Address_success() { //Arrange var addressId = 5; var city = "London"; var catalogContext = new AddressContext(_dbOptions); //Act var testController = new AddressController(catalogContext); var actionResult = await testController.GetAddressByIdAsync(addressId).ConfigureAwait(false); //Assert Assert.IsType <ActionResult <Microservices.Address.API.Model.Address> >(actionResult); var result = Assert.IsAssignableFrom <Microservices.Address.API.Model.Address> (actionResult.Value); Assert.Equal(addressId, result.Id); Assert.Equal(city.ToUpper(), result.City.ToUpper()); }