public override void Given() { _mockResult = new ManagePostalAddressViewModel { DepartmentName = "Dept", OrganisationName = "Org", AddressLine1 = "Line1", AddressLine2 = "Line2", Town = "Town", Postcode = "x11 1yy" }; ProviderAddressLoader.GetAddressAsync <ManagePostalAddressViewModel>(ProviderUkprn).Returns(_mockResult); }
public async Task <IActionResult> ManagePostalAddressAsync() { var viewModel = await _providerAddressLoader.GetAddressAsync <ManagePostalAddressViewModel>(User.GetUkPrn()); if (viewModel == null) { viewModel = new ManagePostalAddressViewModel(); } await _cacheService.RemoveAsync <AddAddressViewModel>(CacheKey); return(View(viewModel)); }
public override void Given() { _mockResult = null; ProviderAddressLoader.GetAddressAsync <ManagePostalAddressViewModel>(ProviderUkprn).Returns(_mockResult); }
public async override Task When() { ActualResult = await Loader.GetAddressAsync <ManagePostalAddressViewModel>(ProviderUkprn); }