public void Setup()
 {
     _physicianDetails = new Mock <IPhysicianDetailsService>();
     _logger           = new Mock <ILogger <PhysicianController> >();
     _configuration    = new Mock <IConfiguration>();
     _httpClient       = new Mock <IHttpClientFactory>();
     _controller       = new PhysicianController(_physicianDetails.Object, _configuration.Object, _logger.Object, _httpClient.Object);
 }
Beispiel #2
0
        private static void LoadDataIntoSession()
        {
            PhysicianController usrControler = new PhysicianController();

            Models.UserModel user = usrControler.GetUserDetails();

            if (user != null)
            {
                HttpContext.Current.Session[Constants.USER] = user;
            }
        }
Beispiel #3
0
        public void testpostPhysician_isrequired()
        {
            bool success = false;

            PhysicianController m = new PhysicianController();


            //m.postMarketing(mkt);

            dynamic var1 = m.postPhysician(mkt_required);

            Assert.AreEqual(var1.Content.success, success);
        }
        public PhysicianInterface()
        {
            controller = new PhysicianController();

            userCommands = new Dictionary <string, Action>()
            {
                { "add diagnoses", AddDiagnoses }
                , { "add patient", AddPatient }
                , { "add symptom", AddSymptom }
                , { "add treatment", AddTreatment }
                , { "list patients", ListPatients }
                , { "list physicians pending", ListPendingPhysicians }
                , { "list treatments", ListTreatments }
                , { "vote physician", VotePhysician }
            };
        }
 public void PrepareForUser(string username)
 {
     controller = new PhysicianController(username);
 }