public void Model_Must_Have_No_Parameters_Ctor(string creditorName) { // Arrange & Act var sut = new CreditorSearchViewModel { CreditorName = creditorName, }; // Assert Assert.AreEqual(creditorName, sut.CreditorName); }
public async Task <IActionResult> DebtSoldSearch(CreditorSearchViewModel modelIn) { if (!ModelState.IsValid) { SetJourneyObject(modelIn); return(ContinueJourneyRedirect(nameof(DebtSoldSearch))); } var modelOut = await _integrationGateway.CmpCreditorSearch(HttpUtility.UrlDecode(modelIn.CreditorName)); SetTempDataObject(_creditorSearchResults, modelOut.Creditors); if (modelOut.Creditors != null && modelOut.Creditors.Count > 1) { SetJourneyObject(modelOut); return(ContinueJourneyRedirect(nameof(DebtSoldSearchResults), modelOut)); } SetJourneyObject(modelIn); return(await CreditorNewAdHocCreditor(modelIn.CreditorName, modelIn.DebtId)); }