Beispiel #1
0
        public void EDValueNullFlavorTest()
        {
            ED ed = new ED("This is the content of ED");

            ed.NullFlavor = NullFlavor.UnEncoded;

            Assert.IsFalse(ed.Validate(), "Validation succeeded but should have failed with both a value and NullFlavor");
        }
Beispiel #2
0
        public void EDValueValidationTest()
        {
            ED ed = new ED("This is the content of ED");

            ed.NullFlavor = null;
            ed.MediaType  = "";
            Assert.IsTrue(ed.Validate(), "Validation with a Value and no NullFlavor failed. The validation should succeed.");
        }
Beispiel #3
0
        public void EDNullFlavorValidationTest()
        {
            ED ed = new ED();

            ed.NullFlavor = NullFlavor.NotAsked;

            Assert.IsTrue(ed.Validate(), "Validation with a NullFlavor and no data failed. The validation should succeed.");
        }
Beispiel #4
0
        public void EDNullTest()
        {
            ED ed = new ED();

            ed.Value = string.Empty;
            ed.Data  = null;

            Assert.IsFalse(ed.Validate(), "Validation succeeded but should have failed with no value or NullFlavor");
        }
Beispiel #5
0
        public void ThumbExampleTest02()
        {
            //build array of bytes for "ed.data"
            byte[] value = new byte[50];
            for (int i = 0; i < 50; i++)
            {
                value[i] = 0;
            }
            ED ed = new ED((TEL)"http://s.hhs.on.ca/media/loops/loop01.avi");

            // creates a new thumbnail
            ED thumbnail = new ED(System.Text.Encoding.UTF8.GetBytes("Hello, this is a test"), "image/gif");

            // Set the thumbnail to a compressed version of the image
            //ed.Compression = EncapsulatedDataCompression.GZ;
            ed.Thumbnail  = thumbnail.Compress(EncapsulatedDataCompression.GZ);
            ed.Reference  = null;
            ed.NullFlavor = NullFlavor.NoInformation;
            ed.Data       = value;
            Assert.IsFalse(ed.Validate());
        }
Beispiel #6
0
        public void EDNullTest()
        {
            ED ed = new ED();
            ed.Value = string.Empty;
            ed.Data = null;

            Assert.IsFalse(ed.Validate(), "Validation succeeded but should have failed with no value or NullFlavor");
        }
Beispiel #7
0
        public void EDValueNullFlavorTest()
        {
            ED ed = new ED("This is the content of ED");
            ed.NullFlavor = NullFlavor.UnEncoded;

            Assert.IsFalse(ed.Validate(), "Validation succeeded but should have failed with both a value and NullFlavor");
        }
Beispiel #8
0
        public void EDValueValidationTest()
        {
            ED ed = new ED("This is the content of ED");
            ed.NullFlavor = null;
            ed.MediaType = "";
            Assert.IsTrue(ed.Validate(), "Validation with a Value and no NullFlavor failed. The validation should succeed.");

        }
Beispiel #9
0
        public void EDNullFlavorValidationTest()
        {
            ED ed = new ED();
            ed.NullFlavor = NullFlavor.NotAsked;

            Assert.IsTrue(ed.Validate(), "Validation with a NullFlavor and no data failed. The validation should succeed.");
        }
Beispiel #10
0
        public void ThumbExampleTest02()
        {
            //build array of bytes for "ed.data"
            byte[] value = new byte[50];
            for (int i = 0; i < 50; i++) { value[i] = 0; }
            ED ed = new ED((TEL)"http://s.hhs.on.ca/media/loops/loop01.avi");

            // creates a new thumbnail
            ED thumbnail = new ED(System.Text.Encoding.UTF8.GetBytes("Hello, this is a test"), "image/gif");

            // Set the thumbnail to a compressed version of the image
            //ed.Compression = EncapsulatedDataCompression.GZ;
            ed.Thumbnail = thumbnail.Compress(EncapsulatedDataCompression.GZ);
            ed.Reference = null;
            ed.NullFlavor = NullFlavor.NoInformation;
            ed.Data = value;
            Assert.IsFalse(ed.Validate());
        }