예제 #1
0
        public void ValueTest()
        {
            GenderLabel target = new GenderLabel();

            PatientGender val = PatientGender.Male;
            target.Value = val;
            Assert.AreEqual<PatientGender>(val, target.Value, "NhsCui.Toolkit.Web.GenderLabel.Value was not set correctly.");

            val = PatientGender.Female;
            target.Value = val;
            Assert.AreEqual<PatientGender>(val, target.Value, "NhsCui.Toolkit.Web.GenderLabel.Value was not set correctly.");

            val = PatientGender.NotKnown;
            target.Value = val;
            Assert.AreEqual<PatientGender>(val, target.Value, "NhsCui.Toolkit.Web.GenderLabel.Value was not set correctly.");
        }
예제 #2
0
        public void ValueBadParameterTest()
        {
            GenderLabel target = new GenderLabel();

            target.Value = (PatientGender)99;
        }
예제 #3
0
        public void RenderContentsTest()
        {
            GenderLabel target = new GenderLabel();

            NhsCui.Toolkit.Web.Test.NhsCui_Toolkit_Web_GenderLabelAccessor accessor = new NhsCui.Toolkit.Web.Test.NhsCui_Toolkit_Web_GenderLabelAccessor(target);

            StringBuilder testString = new StringBuilder();
            HtmlTextWriter writer = new HtmlTextWriter(new StringWriter(testString, CultureInfo.InvariantCulture));

            accessor.RenderContents(writer);
            Assert.AreNotEqual<string>(string.Empty, testString.ToString());
        }