public void SetDataPointSourceAtDataPointCreateCheckSource()
        {
            RuleMSX         rmsx               = new RuleMSX();
            string          newDataSetName     = "NewDataSet";
            string          newDataPointName   = "NewDataPointName";
            string          testDataPointValue = "TestDataPointValue";
            DataSet         ds   = rmsx.createDataSet(newDataSetName);
            DataPointSource srci = new TestDataPointSource(testDataPointValue);
            DataPoint       dpo  = ds.addDataPoint(newDataPointName, srci);
            DataPointSource srco = dpo.GetSource();

            Assert.That(srco.GetValue().ToString(), Is.EqualTo(testDataPointValue));
        }
        public void DataPointSourceSetStaleNoError()
        {
            // Call to SetStale() on DataPointSource should return no error
            RuleMSX         rmsx               = new RuleMSX();
            string          newDataSetName     = "NewDataSet";
            string          newDataPointName   = "NewDataPointName";
            string          testDataPointValue = "TestDataPointValue";
            DataSet         ds   = rmsx.createDataSet(newDataSetName);
            DataPoint       dpo  = ds.addDataPoint(newDataPointName);
            DataPointSource srci = new TestDataPointSource(testDataPointValue);

            dpo.SetDataPointSource(srci);
            Assert.DoesNotThrow(() => srci.SetStale());
        }
Ejemplo n.º 3
0
        public void SetDataPointSourceGetSourceReturnCorrect()
        {
            RuleMSX         rmsx               = new RuleMSX();
            string          newDataSetName     = "NewDataSet";
            string          newDataPointName   = "NewDataPointName";
            string          testDataPointValue = "TestDataPointValue";
            DataSet         ds   = rmsx.CreateDataSet(newDataSetName);
            DataPoint       dpo  = ds.AddDataPoint(newDataPointName);
            DataPointSource srci = new TestDataPointSource(testDataPointValue);

            dpo.SetDataPointSource(srci);
            DataPointSource srco = dpo.GetSource();

            Assert.That(srco.GetValue().ToString(), Is.EqualTo(testDataPointValue));
        }