public void GetHotLinesTest() { using (ShimsContext.Create()) { ShimServiceProviderRepo.AllInstances.GetAllActiveServiceProviders = repo => serviceProviderList; logics = new HotlineLogics(); var hotLines = logics.GetHotlines(); //assert Assert.IsNotNull(hotLines); Assert.AreEqual(1, hotLines.Count); Assert.AreEqual(hotLines[0].CrisisNumber, crisisContactsList[1].CrisisNumber); } }
public void GetHotLinesTestDisplay() { logics = new HotlineLogics(); using (ShimsContext.Create()) { ShimServiceProviderRepo.AllInstances.GetAllActiveServiceProviders = repo => serviceProviderDisplay; var hotLines = this.logics.GetHotlines(); //assert Assert.IsNotNull(hotLines); Assert.AreEqual(hotLines[0].ProviderLocation, crisisContactsList[1].ProviderLocation); } }
public ActionResult GetHotlineProviders() { var hotLogic = new HotlineLogics().GetHotlines(); return(this.Json(hotLogic, JsonRequestBehavior.AllowGet)); }