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); }
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); }
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); }
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); }