public GenericSystemsControllerTests() { var systemModel = new GenericSystemViewModel { Id = "5a8417338317338c8e0809e5", Name = "Ambulance Service Call Handler", FModule = "Ambulance_Service_Call_Handler", Asid = "200000000115", Context = "Some context...", ActionTypes = new List <ActorType> { ActorType.Consumer } }; var personelModel = new PersonnelViewModel { Id = "5a8417f68317338c8e080a62", Name = "999 Call Handler", ImageUrl = "....", Context = new List <ContentView>() { new ContentView { Title = "Title Text", Content = new List <string> { "Content Text" }, CssClass = "CssClass Text", Order = 1 } }, UsesNrls = true, ActorOrganisationId = "5a82f9ffcb969daa58d33377", CModule = "CModule-Type", SystemIds = new List <string> { "5a8417338317338c8e0809e5" }, Benefits = new List <string> { "benefitid" } }; var genericSystemService = new Mock <IGenericSystemService>(); genericSystemService.Setup(x => x.GetById(It.Is <string>(y => y == "5a8417338317338c8e0809e5"))).Returns(Task.Run(() => systemModel)); genericSystemService.Setup(x => x.GetById(It.Is <string>(y => y == "5a8417338317338c8e0809e6"))).Returns(Task.Run(() => (GenericSystemViewModel)null)); var personnelService = new Mock <IPersonnelService>(); personnelService.Setup(x => x.GetModelBySystemId(It.Is <string>(y => y == "5a8417f68317338c8e080a62"))).Returns(Task.Run(() => personelModel)); personnelService.Setup(x => x.GetModelBySystemId(It.Is <string>(y => y == "5a8417f68317338c8e080a63"))).Returns(Task.Run(() => (PersonnelViewModel)null)); _genericSystemService = genericSystemService.Object; _personnelService = personnelService.Object; }
public void Dispose() { _genericSystemService = null; _personnelService = null; }
public GenericSystemsController(IGenericSystemService genericSystemService) { _genericSystemService = genericSystemService; }
public GenericSystemsController(IGenericSystemService genericSystemService, IPersonnelService personnelService) { _genericSystemService = genericSystemService; _personnelService = personnelService; }