Exemple #1
0
        public void Dq_10_BasicGoodness()
        {
            // Test basic good and bad qualities

            DataQuality good = DataQuality.CreateGood();
            DataQuality bad  = DataQuality.CreateBad();

            Assert.IsTrue(good.IsGood);
            Assert.IsFalse(bad.IsGood);
        }
Exemple #2
0
        public void Dq_20_CustomBad()
        {
            // Test bad qualities with a custom reason

            DataQuality customBad1 = DataQuality.CreateBad("myreason");
            DataQuality customBad2 = DataQuality.CreateBad("myreason/subreason");

            Assert.IsFalse(customBad1.IsGood);
            Assert.IsFalse(customBad2.IsGood);
        }
Exemple #3
0
        public void Dq_25_CustomBad_Errors()
        {
            // Test bad qualities with a custom reason (with errors)

            var myAction = new Action(() =>
            {
                DataQuality.CreateBad("myreaso n");
            });

            TestCommon.TestHelper.AssertArgumentException(myAction, ERR_WHITESPACES_START);
        }
Exemple #4
0
        public void Obs_22_Create_BadQuality()
        {
            Observation originalObj = new Observation(new Item_Measurement(null))
            {
                // Populating the object
                ResultQuality = DataQuality.CreateBad()
            };

            // Serializing and validating the XML document
            Observation parsedObj = SerialiseAndReadResultObj(originalObj);

            // Asserting bad data quality
            Assert.IsFalse(parsedObj.ResultQuality.IsGood);
        }