public void CompareWithNullException()
        {
            var dta = new Dta(false, 0, 0);
            var ret = new SingleComparison(dta, 0, 0, 0);

            Assert.ThrowsException <ArgumentNullException>(() => ret.Equals(null));
        }
        public void InitializationTestTotalFailed()
        {
            var dta = new Dta(false, 0, 0);
            var ret = new SingleComparison(dta, 100, 10, 1);

            Assert.AreEqual(1, ret.TotalFailed);
        }
        public void EqualsTrueTest()
        {
            var dta = new Dta(false, 0, 0);
            var ret = new SingleComparison(dta, 0, 0, 0);

            Assert.IsTrue(ret.Equals(ret));
        }
        public void CanInitialize()
        {
            var dta = new Dta(false, 0, 0);
            var ret = new SingleComparison(dta, 0, 0, 0);

            Assert.IsNotNull(ret);
        }
        public void EqualsFalseTest1()
        {
            var dta  = new Dta(false, 0, 0);
            var ret  = new SingleComparison(dta, 0, 0, 0);
            var ret2 = new SingleComparison(dta, 1, 0, 0);

            Assert.IsFalse(ret2.Equals(ret));
        }
示例#6
0
        public void Mu100vs101_SNC002()
        {
            // Compares algorithm result to SNC patient
            // RD.UnitTest.P1Ref.X-100A-10.0-1	RD.UnitTest.P5 Varied MU.X-101A-10.0-1	29	15523	15552	DTA     10	0.1	0	Abs
            Dta dta = new Dta(false, 0.1, 0.001, 0, false, false, 0);

            sourceFile = DSCcoreTest.Properties.Resources.RD_UnitTest_P1Ref_X_100A_10_0_1;
            targetFile = DSCcoreTest.Properties.Resources.RD_UnitTest_P5_Varied_MU_X_101A_10_0_1;
            source     = new DoseMatrixOptimal(new EvilDICOM.RT.RTDose(EvilDICOM.Core.DICOMObject.Read(sourceFile)));
            target     = new DoseMatrixOptimal(new EvilDICOM.RT.RTDose(EvilDICOM.Core.DICOMObject.Read(targetFile)));


            SingleComparison result1 = mathematics.CompareRelative(source, target, dta);

            System.Diagnostics.Debug.WriteLine("Compared");
            Assert.AreEqual(8080200, result1.TotalCompared);
        }
        public void InvalidFailedException()
        {
            var dta = new Dta(false, 0, 0);

            Assert.ThrowsException <ArgumentException>(() => new SingleComparison(dta, 100, 10, 1000));
        }
 public void Initialize()
 {
     dta00a      = new Dta(false, 0, 0, 0, false);
     mathematics = new X86Mathematics();
 }