Пример #1
0
        public void FormTest()
        {
            MedicationLine target = new MedicationLine();
            string         val    = "FormTest";

            target.Form = val;
        }
Пример #2
0
        public void ApplyShowRulesTestShowOverride()
        {
            MedicationLine target = new MedicationLine();

            // Clear all properties
            target.SimpleMode        = false;
            target.ShowDosageDetails = false;
            target.ShowGraphics      = false;
            target.ShowReason        = false;
            target.ShowStatus        = false;
            target.ShowStatusDate    = false;

            target.SimpleMode        = true;
            target.ShowDosageDetails = true;
            Assert.IsFalse(target.SimpleMode);

            target.SimpleMode   = true;
            target.ShowGraphics = true;
            Assert.IsFalse(target.SimpleMode);

            target.SimpleMode = true;
            target.ShowReason = true;
            Assert.IsFalse(target.SimpleMode);

            target.SimpleMode = true;
            target.ShowStatus = true;
            Assert.IsFalse(target.SimpleMode);

            target.SimpleMode     = true;
            target.ShowStatusDate = true;
            Assert.IsFalse(target.SimpleMode);
        }
Пример #3
0
        public void FrequencyTestException()
        {
            MedicationLine target = new MedicationLine();
            string         val    = "In molestie felis. Donec suscipit. Praesent ut nulla ut lectus facilisis adipiscing. Ut ac ipsum a erat tincidunt accumsan. Nam sed neque sit amet velit porta eleifend. Integer quis magna ut mauris rutrum dignissim. Nunc egestas erat. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean facilisis est ut turpis. Ut blandit cursus felis. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Nunc nisi augue, lacinia vitae, blandit nec, venenatis id, tellus. Nam fringilla, enim vitae scelerisque tristique, ipsum neque feugiat dui, vitae auctor enim diam non est. Fusce malesuada, nisl et varius accumsan, lorem ligula luctus est, non nonummy sem magna molestie sapien. ";

            target.Frequency = val;
        }
Пример #4
0
        public void StatusTest()
        {
            MedicationLine   target = new MedicationLine();
            MedicationStatus val    = MedicationStatus.Active;

            target.Status = val;
            Assert.AreEqual(val, target.Status, "NhsCui.Toolkit.Web.MedicationLine.Status was not set correctly.");
        }
Пример #5
0
        public void DosageTextTest()
        {
            MedicationLine target = new MedicationLine();
            string         val    = "Valid DosageText";

            target.DosageText = val;
            Assert.AreEqual(val, target.DosageText, "NhsCui.Toolkit.Web.MedicationLine.DosageText was not set correctly.");
        }
Пример #6
0
        public void DoseTest()
        {
            MedicationLine target = new MedicationLine();
            string         val    = "dose";

            target.Dose = val;
            Assert.AreEqual(val, target.Dose, "NhsCui.Toolkit.Web.MedicationLine.Dose was not set correctly.");
        }
Пример #7
0
        public void SimpleModeTest()
        {
            MedicationLine target = new MedicationLine();
            bool           val    = true;

            target.SimpleMode = val;
            Assert.AreEqual(val, target.SimpleMode, "NhsCui.Toolkit.Web.MedicationLine.SimpleMode was not set correctly.");
        }
Пример #8
0
        public void StatusDateTest()
        {
            MedicationLine target = new MedicationLine();
            DateTime       val    = DateTime.Now;

            target.StatusDate = val;
            Assert.AreEqual(val, target.StatusDate, "NhsCui.Toolkit.Web.MedicationLine.StatusDate was not set correctly.");
        }
Пример #9
0
        public void RouteTest()
        {
            MedicationLine target = new MedicationLine();
            string         val    = "Route Test";

            target.Route = val;
            Assert.AreEqual(val, target.Route, "NhsCui.Toolkit.Web.MedicationLine.Route was not set correctly.");
        }
Пример #10
0
        public void FrequencyTest()
        {
            MedicationLine target = new MedicationLine();
            string         val    = "FrequencyTest";

            target.Frequency = val;
            Assert.AreEqual(val, target.Frequency, "NhsCui.Toolkit.Web.MedicationLine.Frequency was not set correctly.");
        }
Пример #11
0
        public void IndicatorGraphicTest()
        {
            MedicationLine target = new MedicationLine();
            string         val    = "~/images/icon/image.png";

            target.IndicatorGraphic = val;
            Assert.AreEqual(val, target.IndicatorGraphic, "NhsCui.Toolkit.Web.MedicationLine.IndicatorGraphic was not set correctly.");
        }
Пример #12
0
        public void MedicationNamesTest()
        {
            MedicationLine target = new MedicationLine();
            MedicationName name   = new MedicationName("NameTest", "InfoTest");

            target.MedicationNames.Add(name);
            Assert.AreEqual(name, target.MedicationNames[0], "NhsCui.Toolkit.Web.MedicationLine.MedicationNames was not set correctly.");
        }
Пример #13
0
        public void OnClientRightClickTest()
        {
            MedicationLine target = new MedicationLine();
            string         val    = "onClientRightClick";

            target.OnClientRightClick = val;
            Assert.AreEqual(val, target.OnClientRightClick, "NhsCui.Toolkit.Web.MedicationLine.OnClientRightClick was not set correctly.");
        }
Пример #14
0
        public void ReasonTest()
        {
            MedicationLine target = new MedicationLine();
            string         val    = "Valid Reason";

            target.Reason = val;
            Assert.AreEqual(val, target.Reason, "NhsCui.Toolkit.Web.MedicationLine.Reason was not set correctly.");
        }
Пример #15
0
        public void ShowStatusTest()
        {
            MedicationLine target = new MedicationLine();
            bool           val    = true;

            target.ShowStatus = val;
            Assert.AreEqual(val, target.ShowStatus, "NhsCui.Toolkit.Web.MedicationLine.ShowStatus was not set correctly.");
        }
Пример #16
0
        public void OnDoubleClickTest()
        {
            MedicationLine target = new MedicationLine();

            target.DoubleClick += new EventHandler(this.Target_DoubleClick);
            NhsCui.Toolkit.Web.Test.NhsCui_Toolkit_Web_MedicationLineAccessor accessor = new NhsCui.Toolkit.Web.Test.NhsCui_Toolkit_Web_MedicationLineAccessor(target);
            EventArgs e = null;

            this.eventRaisedEvent.Reset();
            accessor.OnDoubleClick(e);
            this.WaitForEvent("DoubleClick");
        }
Пример #17
0
        public void IsSelectedTest()
        {
            MedicationLine target = new MedicationLine();
            bool           val    = true;

            target.IsSelected = val;
            Assert.AreEqual(val, target.IsSelected, "NhsCui.Toolkit.Web.MedicationLine.IsSelected was not set correctly.");

            val = false;
            target.IsSelected = val;
            Assert.AreEqual(val, target.IsSelected, "NhsCui.Toolkit.Web.MedicationLine.IsSelected was not set correctly.");
        }
Пример #18
0
 public void OnDoubleClickTest()
 {
     MedicationLine target = new MedicationLine();
     target.DoubleClick += new EventHandler(this.Target_DoubleClick);
     NhsCui.Toolkit.Web.Test.NhsCui_Toolkit_Web_MedicationLineAccessor accessor = new NhsCui.Toolkit.Web.Test.NhsCui_Toolkit_Web_MedicationLineAccessor(target);
     EventArgs e = null; 
     this.eventRaisedEvent.Reset();
     accessor.OnDoubleClick(e);
     this.WaitForEvent("DoubleClick");
 }
Пример #19
0
 public void RouteTestException()
 {
     MedicationLine target = new MedicationLine();
     string val = "In molestie felis. Donec suscipit. Praesent ut nulla ut lectus facilisis adipiscing. Ut ac ipsum a erat tincidunt accumsan. Nam sed neque sit amet velit porta eleifend. Integer quis magna ut mauris rutrum dignissim. Nunc egestas erat. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean facilisis est ut turpis. Ut blandit cursus felis. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Nunc nisi augue, lacinia vitae, blandit nec, venenatis id, tellus. Nam fringilla, enim vitae scelerisque tristique, ipsum neque feugiat dui, vitae auctor enim diam non est. Fusce malesuada, nisl et varius accumsan, lorem ligula luctus est, non nonummy sem magna molestie sapien. ";
     target.Route = val;
     Assert.AreEqual(val, target.Route, "NhsCui.Toolkit.Web.MedicationLine.Route was not set correctly.");
 }
Пример #20
0
 public void ShowStatusTest()
 {
     MedicationLine target = new MedicationLine();
     bool val = true;
     target.ShowStatus = val;
     Assert.AreEqual(val, target.ShowStatus, "NhsCui.Toolkit.Web.MedicationLine.ShowStatus was not set correctly.");
 }
Пример #21
0
 public void FormTest()
 {
     MedicationLine target = new MedicationLine();
     string val = "FormTest";
     target.Form = val;
 }
Пример #22
0
 public void SimpleModeTest()
 {
     MedicationLine target = new MedicationLine();
     bool val = true;
     target.SimpleMode = val;
     Assert.AreEqual(val, target.SimpleMode, "NhsCui.Toolkit.Web.MedicationLine.SimpleMode was not set correctly.");
 }
Пример #23
0
 public void StatusDateTest()
 {
     MedicationLine target = new MedicationLine();
     DateTime val = DateTime.Now;
     target.StatusDate = val;
     Assert.AreEqual(val, target.StatusDate, "NhsCui.Toolkit.Web.MedicationLine.StatusDate was not set correctly.");
 }
Пример #24
0
 public void RouteTest()
 {
     MedicationLine target = new MedicationLine();
     string val = "Route Test";
     target.Route = val;
     Assert.AreEqual(val, target.Route, "NhsCui.Toolkit.Web.MedicationLine.Route was not set correctly.");
 }
Пример #25
0
 public void StatusTest()
 {
     MedicationLine target = new MedicationLine();
     MedicationStatus val = MedicationStatus.Active;
     target.Status = val;
     Assert.AreEqual(val, target.Status, "NhsCui.Toolkit.Web.MedicationLine.Status was not set correctly.");
 }
Пример #26
0
 public void DoseTest()
 {
     MedicationLine target = new MedicationLine();
     string val = "dose"; 
     target.Dose = val;
     Assert.AreEqual(val, target.Dose, "NhsCui.Toolkit.Web.MedicationLine.Dose was not set correctly.");
 }
Пример #27
0
 public void IndicatorGraphicTest()
 {
     MedicationLine target = new MedicationLine();
     string val = "~/images/icon/image.png";
     target.IndicatorGraphic = val;
     Assert.AreEqual(val, target.IndicatorGraphic, "NhsCui.Toolkit.Web.MedicationLine.IndicatorGraphic was not set correctly.");
 }
Пример #28
0
 public void MedicationNamesTest()
 {
     MedicationLine target = new MedicationLine();
     MedicationName name = new MedicationName("NameTest", "InfoTest");
     target.MedicationNames.Add(name);
     Assert.AreEqual(name, target.MedicationNames[0], "NhsCui.Toolkit.Web.MedicationLine.MedicationNames was not set correctly.");
 }
Пример #29
0
 public void ReasonTest()
 {
     MedicationLine target = new MedicationLine();
     string val = "Valid Reason";
     target.Reason = val;
     Assert.AreEqual(val, target.Reason, "NhsCui.Toolkit.Web.MedicationLine.Reason was not set correctly.");
 }
Пример #30
0
 public void FrequencyTest()
 {
     MedicationLine target = new MedicationLine();
     string val = "FrequencyTest";
     target.Frequency = val;
     Assert.AreEqual(val, target.Frequency, "NhsCui.Toolkit.Web.MedicationLine.Frequency was not set correctly.");
 }
Пример #31
0
 public void OnClientRightClickTest()
 {
     MedicationLine target = new MedicationLine();
     string val = "onClientRightClick";
     target.OnClientRightClick = val;
     Assert.AreEqual(val, target.OnClientRightClick, "NhsCui.Toolkit.Web.MedicationLine.OnClientRightClick was not set correctly.");
 }
Пример #32
0
        public void ApplyShowRulesTestShowOverride()
        {
            MedicationLine target = new MedicationLine();

            // Clear all properties
            target.SimpleMode = false;
            target.ShowDosageDetails = false;
            target.ShowGraphics = false;
            target.ShowReason = false;
            target.ShowStatus = false;
            target.ShowStatusDate = false;

            target.SimpleMode = true;
            target.ShowDosageDetails = true;
            Assert.IsFalse(target.SimpleMode);

            target.SimpleMode = true;
            target.ShowGraphics = true;
            Assert.IsFalse(target.SimpleMode);

            target.SimpleMode = true;
            target.ShowReason = true;
            Assert.IsFalse(target.SimpleMode);

            target.SimpleMode = true;
            target.ShowStatus = true;
            Assert.IsFalse(target.SimpleMode);

            target.SimpleMode = true;
            target.ShowStatusDate = true;
            Assert.IsFalse(target.SimpleMode);
        }
Пример #33
0
        public void IsSelectedTest()
        {
            MedicationLine target = new MedicationLine();
            bool val = true;
            target.IsSelected = val;
            Assert.AreEqual(val, target.IsSelected, "NhsCui.Toolkit.Web.MedicationLine.IsSelected was not set correctly.");

            val = false;
            target.IsSelected = val;
            Assert.AreEqual(val, target.IsSelected, "NhsCui.Toolkit.Web.MedicationLine.IsSelected was not set correctly.");
        }
Пример #34
0
        /// <summary>
        /// Create Extender as a child control
        /// </summary>
        private void AddChildControls()
        {
            // Look Behind - do not render in Design Mode
            if (!this.DesignMode)
            {
                this.lookBehindListView              = new MedicationListView(this.Items);
                this.lookBehindListView.ID           = this.ID + "_LookBehind";
                this.lookBehindListView.Mode         = MedicationListViewMode.LookBehind;
                this.lookBehindListView.ShowGraphics = this.ShowGraphics;
                this.lookBehindListView.Style.Add(HtmlTextWriterStyle.Display, this.ShowLookAheadBehind ? "" : "none");
                this.Controls.Add(this.lookBehindListView);
                this.medicationGridExtender.LookBehindControlID = this.lookBehindListView.ClientID;
            }

            // Grid Contents
            MedicationGridHeader medicationGridHeader = new MedicationGridHeader();

            medicationGridHeader.ID         = this.ID + "_Header";
            medicationGridHeader.ParentGrid = this;

            this.Controls.Add(medicationGridHeader);

            // Medication Lines - do not render in DesignMode
            if (!this.DesignMode)
            {
                for (int index = 0; index < this.Items.Count; index++)
                {
                    Medication     medication = this.Items[index];
                    MedicationLine line       = new MedicationLine(medication);
                    line.ID = string.Concat(this.ID, "_medLine", index.ToString(CultureInfo.CurrentUICulture));
                    line.EnableViewState   = false;
                    line.EnableExtender    = false;
                    line.ShowDosageDetails = this.ShowDosageDetails;
                    line.ShowGraphics      = this.ShowGraphics;
                    line.ShowReason        = this.ShowReason;
                    line.ShowStatus        = this.ShowStatus;
                    line.RenderTable       = false;
                    line.ShowStatusDate    = this.ShowStatusDate;
                    line.SimpleMode        = this.SimpleMode;
                    line.CssClass          = "nhscui_mg_ml";
                    line.ToolTip           = medication.MedicationTooltip;
                    this.Controls.Add(line);
                }
            }

            MedicationGridFooter medicationGridFooter = new MedicationGridFooter();

            medicationGridFooter.ID = this.ID + "_Footer";
            this.Controls.Add(medicationGridFooter);

            // Look Ahead - not render Design Time
            if (!this.DesignMode)
            {
                this.lookAheadListView              = new MedicationListView(this.Items);
                this.lookAheadListView.ID           = this.ID + "_LookAhead";
                this.lookAheadListView.ShowGraphics = this.ShowGraphics;
                this.lookAheadListView.Style.Add(HtmlTextWriterStyle.Display, this.ShowLookAheadBehind ? "" : "none");
                this.lookAheadListView.Mode = MedicationListViewMode.LookAhead;
                this.Controls.Add(this.lookAheadListView);
                this.medicationGridExtender.LookAheadControlID = this.lookAheadListView.ClientID;
            }
        }
Пример #35
0
 public void DosageTextTest()
 {
     MedicationLine target = new MedicationLine();
     string val = "Valid DosageText";
     target.DosageText = val;
     Assert.AreEqual(val, target.DosageText, "NhsCui.Toolkit.Web.MedicationLine.DosageText was not set correctly.");
 }