public void AssertNameCanBeSet()
        {
            //Arrange
            var vm = new ServiceGroupDetailsViewmodel();
            var testName = "TestName";

            //Act
            vm.Name = testName;

            //Assert
            Assert.AreEqual(vm.Name, testName);
        }
        public void AssertIdxCanBeSet()
        {
            //Arrange
            var vm = new ServiceGroupDetailsViewmodel();
            var testIdx = 999;

            //Act
            vm.Idx = testIdx;

            //Assert
            Assert.AreEqual(vm.Idx, testIdx);
        }
        public PartialViewResult ServiceGroupDetails(int idx, string name)
        {
            var sgViewmodel = new ServiceGroupDetailsViewmodel()
            {
                Idx = idx,
                Name = name,
                StartDate = viewModel.StartDate,
                EndDate = viewModel.EndDate,
                DiagnosisCodeIDlist = viewModel.DiagnosisCodeIDlist,
                ServiceLinesList = viewModel.ServiceLinesList,
                PatientTypesList = viewModel.PatientTypesList,
                ClientOrganizationIDList = viewModel.ClientOrganizationIDList,
                OrganizationList = viewModel.OrganizationList,
                EncounterTypesIDlist = viewModel.EncounterTypesIDlist,
                EncounterTypesList = viewModel.EncounterTypesList,
                CustomerTypesList = viewModel.CustomerTypesList
            };

            if (ModelState.IsValid)
            {
                Stopwatch sw = new Stopwatch();
                sw.Start();

                var pv = PartialView("_ServiceGroupDetailsPartialView", sgViewmodel);
                try
                {
                    SystemDataProvider systemDataProvider = Session["SystemDataProvider"] as SystemDataProvider;
                    var sqlHelper = new SqlHelper(systemDataProvider);
                    sqlHelper.GetServiceLineGroupDetails(sgViewmodel);
                    Session.Add("ServiceGroupDetails", sgViewmodel);
                }
                finally
                { 
                    sw.Stop();
                    LoggerHelper.RecordTiming(System.Reflection.MethodBase.GetCurrentMethod().Name, sw, log);
                }
                return pv;
            }
            return null;
        }
        public void AssertStartDateCanBeSet()
        {
            //Arrange
            var vm = new ServiceGroupDetailsViewmodel();
            var testDate = DateTime.Now;

            //Act
            vm.StartDate = testDate;

            //Assert
            Assert.AreEqual(vm.StartDate, testDate);
        }
        public void Assert_GetSelectedClientOrgIds_Return_Correct_Ids_If_Middle_Item_Is_Selected()
        {
            //Arrange
            var vm = new ServiceGroupDetailsViewmodel();
            vm.ClientOrganizationIDList = SetupClientOrganizationIDList();
            vm.OrganizationList = SetupGetSelectedClientOrgIdsList();
            vm.OrganizationList["B"] = true;

            //Act
            var testResults = vm.GetSelectedClientOrgIds();

            //Assert
            Assert.AreEqual(testResults[0], 1);
        }
        public void Assert_GetSelectedClientOrgIds_Return_Correct_Ids_If_All_Items_Are_Selected()
        {
            //Arrange
            var vm = new ServiceGroupDetailsViewmodel();
            vm.ClientOrganizationIDList = SetupClientOrganizationIDList();
            vm.OrganizationList = SetupGetSelectedClientOrgIdsList();
            vm.OrganizationList["A"] = true;
            vm.OrganizationList["B"] = true;
            vm.OrganizationList["C"] = true;
            vm.OrganizationList["D"] = true;

            //Act
            var testResults = vm.GetSelectedClientOrgIds();

            //Assert
            Assert.AreEqual(testResults.Count, 4);
        }
        public void Assert_GetSelectedEncounterTypeIds_Return_Correct_Ids_If_Middle_Item_Is_Selected()
        {
            //Arrange
            var vm = new ServiceGroupDetailsViewmodel();
            vm.EncounterTypesIDlist = SetupEncounterTypesIDlist();
            vm.EncounterTypesList = SetupEncounterTypesList();
            vm.EncounterTypesList["B"] = true;


            //Act
            var testResults = vm.GetSelectedEncounterTypeIds();

            //Assert
            Assert.AreEqual(testResults[0], 1);
        }
        public void Assert_GetSelectedEncounterTypeIds_Return_Correct_Ids_If_All_Items_Are_Selected()
        {
            //Arrange
            var vm = new ServiceGroupDetailsViewmodel();
            vm.EncounterTypesIDlist = SetupEncounterTypesIDlist();
            vm.EncounterTypesList = SetupEncounterTypesList();
            vm.EncounterTypesList["A"] = true;
            vm.EncounterTypesList["B"] = true;
            vm.EncounterTypesList["C"] = true;
            vm.EncounterTypesList["D"] = true;

            //Act
            var testResults = vm.GetSelectedEncounterTypeIds();

            //Assert
            Assert.AreEqual(testResults.Count, 4);
        }
        public void AssertDiagnosisProcedureDetailsResultsIsNotNullWhenServiceGroupDetailsViewmodelIsCreated()
        {
            //Arrange
            var vm = new ServiceGroupDetailsViewmodel();

            //Act

            //Assert
            Assert.IsNotNull(vm.ProcedureDetailsResults);
        }
        public void AssertServiceGroupDetailsViewmodelCanBeCreated()
        {
            //Arrange
            var vm = new ServiceGroupDetailsViewmodel();

            //Act

            //Assert
            Assert.IsNotNull(vm);
        }