public EprControllerTests()
        {
            var model = new CrisisPlanViewModel
            {
                InvolveFamilyOrCarer  = true,
                SignsFeelingUnwell    = "SignsFeelingUnwell",
                PotentialTriggers     = "PotentialTriggers",
                WhatHelpsInCrisis     = "WhatHelpsInCrisis",
                ActionForDependants   = "ActionForDependants",
                EmergencyLocation     = "EmergencyLocation",
                EmergencyNumber       = "EmergencyNumber",
                CrisisNumber          = "CrisisNumber",
                PatientAcceptsPlan    = true,
                PlanCreatedBy         = "PlanCreatedBy",
                PlanCreatedByJobTitle = "PlanCreatedByJobTitle",
                Version          = 1,
                RecordType       = RecordType.MentalHealthCrisisPlan,
                Active           = true,
                PatientNhsNumber = "PatientNhsNumber",
                Id      = "5a82f9ffcb969daa58d33377",
                OrgCode = "Org1",
                Asid    = "1234567890"
            };

            var crisisPlanService = new Mock <ICrisisPlanService>();

            crisisPlanService.Setup(x => x.GetForPatient(It.Is <string>(y => y == "1234567890"), It.IsAny <bool>())).Returns(Task.Run(() => model));
            crisisPlanService.Setup(x => x.GetForPatient(It.Is <string>(y => y == "1234567899"), It.IsAny <bool>())).Returns(Task.Run(() => (CrisisPlanViewModel)null));
            crisisPlanService.Setup(x => x.GetById(It.Is <string>(y => y == "5a82f9ffcb969daa58d33377"))).Returns(Task.Run(() => model));
            crisisPlanService.Setup(x => x.GetById(It.Is <string>(y => y == "5a82f9ffcb969daa58d33378"))).Returns(Task.Run(() => (CrisisPlanViewModel)null));

            _crisisPlanService = crisisPlanService.Object;
        }
 public void Dispose()
 {
     _crisisPlanService = null;
 }
 public EprController(ICrisisPlanService crisisPlanService)
 {
     _crisisPlanService = crisisPlanService;
 }