示例#1
0
        public ActorOrganisationsControllerTests()
        {
            var model = new ActorOrganisationViewModel
            {
                Id       = "5a82f9ffcb969daa58d33377",
                Type     = ActorType.Consumer,
                Name     = "Ambulance Service",
                ImageUrl = "....",
                Context  = new List <ContentView>()
                {
                    new ContentView
                    {
                        Title   = "Title Text",
                        Content = new List <string> {
                            "Content Text"
                        },
                        CssClass = "CssClass Text",
                        Order    = 1
                    }
                },
                OrgCode  = "AMSR01",
                Benefits = new List <string> {
                    "benefitid"
                },
                PersonnelLinkId = "testlink"
            };

            var actorOrganisationService = new Mock <IActorOrganisationService>();

            actorOrganisationService.Setup(x => x.GetById(It.Is <string>(y => y == "5a82f9ffcb969daa58d33377"))).Returns(Task.Run(() => model));
            actorOrganisationService.Setup(x => x.GetById(It.Is <string>(y => y == "5a82f9ffcb969daa58d33378"))).Returns(Task.Run(() => (ActorOrganisationViewModel)null));
            _actorOrganisationService = actorOrganisationService.Object;
        }
示例#2
0
 public void Dispose()
 {
     _actorOrganisationService = null;
 }
示例#3
0
 public ActorOrganisationsController(IActorOrganisationService actorOrgService)
 {
     _actorOrgService = actorOrgService;
 }
 public BenefitsViewService(IPersonnelService personnelService, IActorOrganisationService actorOrganisationService, IBenefitsService benefitsService)
 {
     _personnelService         = personnelService;
     _actorOrganisationService = actorOrganisationService;
     _benefitsService          = benefitsService;
 }