NUnit.Framework.Assert.That(TActual, NUnit.Framework.Constraints.IResolveConstraint, System.Func)

Here are the examples of the csharp api NUnit.Framework.Assert.That(TActual, NUnit.Framework.Constraints.IResolveConstraint, System.Func) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

4637 Examples 7

[Test]
        public void Ticket788_12_1()
        {
            QueryRetrievePatientRootInformationModel queryRetrievePatientRootInformationModel = null;
            DicomMessage cFindRequest = null;

            Ticket788CommonCode1(@"*\*", out queryRetrievePatientRootInformationModel, out cFindRequest);

            DicomMessageCollection dicomMessageCollection = queryRetrievePatientRootInformationModel.QueryInformationModel(cFindRequest);

            // Expect two messages with status pending and on message with status success.
            replacedert.That(dicomMessageCollection.Count, Is.EqualTo(3));
        }

[Test]
        public void Ticket788_13_1()
        {
            DicomFile dicomFile = null;

            QueryRetrievePatientRootInformationModel queryRetrievePatientRootInformationModel = new QueryRetrievePatientRootInformationModel();

            dicomFile = new DicomFile();
            dicomFile.DataSet.Set("0x00100020", VR.LO, "1");
            dicomFile.DataSet.Set("0x0020000D", VR.UI, "1.1");
            dicomFile.DataSet.Set("0x0020000E", VR.UI, "1.1.1");
            dicomFile.DataSet.Set("0x00080018", VR.UI, "1.1.1.1");
            queryRetrievePatientRootInformationModel.AddToInformationModel(dicomFile);

            dicomFile = new DicomFile();
            dicomFile.DataSet.Set("0x00100020", VR.LO, "2");
            dicomFile.DataSet.Set("0x0020000D", VR.UI, "2.1");
            dicomFile.DataSet.Set("0x0020000E", VR.UI, "2.1.1");
            dicomFile.DataSet.Set("0x00080018", VR.UI, "2.1.1.1");
            queryRetrievePatientRootInformationModel.AddToInformationModel(dicomFile);

            dicomFile = new DicomFile();
            dicomFile.DataSet.Set("0x00100020", VR.LO, "3");
            dicomFile.DataSet.Set("0x0020000D", VR.UI, "3.1");
            dicomFile.DataSet.Set("0x0020000E", VR.UI, "3.1.1");
            dicomFile.DataSet.Set("0x00080018", VR.UI, "3.1.1.1");
            queryRetrievePatientRootInformationModel.AddToInformationModel(dicomFile);

            DicomMessage cMoveRequest = new DicomMessage(DimseCommand.CMOVERQ);

            cMoveRequest.Set("0x00000002", VR.UI, "1.2.840.10008.5.1.4.1.2.1.2");
            cMoveRequest.Set("0x00000600", VR.AE, "MOVE_DESTINATION");
            cMoveRequest.Set("0x00080052", VR.CS, "PATIENT");
            cMoveRequest.Set("0x00100020", VR.LO, "2");

            DvtkData.Collections.StringCollection fileNames = queryRetrievePatientRootInformationModel.RetrieveInformationModel(cMoveRequest);

            replacedert.That(fileNames.Count, Is.EqualTo(1));
        }

[Test]
        public void Ticket788_14_1()
        {
            DicomFile dicomFile = null;

            QueryRetrievePatientRootInformationModel queryRetrievePatientRootInformationModel = new QueryRetrievePatientRootInformationModel();

            dicomFile = new DicomFile();
            dicomFile.DataSet.Set("0x00100020", VR.LO, "1");
            dicomFile.DataSet.Set("0x0020000D", VR.UI, "1.1");
            dicomFile.DataSet.Set("0x0020000E", VR.UI, "1.1.1");
            dicomFile.DataSet.Set("0x00080018", VR.UI, "1.1.1.1");
            queryRetrievePatientRootInformationModel.AddToInformationModel(dicomFile);

            dicomFile = new DicomFile();
            dicomFile.DataSet.Set("0x00100020", VR.LO, "1");
            dicomFile.DataSet.Set("0x0020000D", VR.UI, "1.2");
            dicomFile.DataSet.Set("0x0020000E", VR.UI, "1.2.1");
            dicomFile.DataSet.Set("0x00080018", VR.UI, "1.2.1.1");
            queryRetrievePatientRootInformationModel.AddToInformationModel(dicomFile);

            dicomFile = new DicomFile();
            dicomFile.DataSet.Set("0x00100020", VR.LO, "1");
            dicomFile.DataSet.Set("0x0020000D", VR.UI, "1.3");
            dicomFile.DataSet.Set("0x0020000E", VR.UI, "1.3.1");
            dicomFile.DataSet.Set("0x00080018", VR.UI, "1.3.1.1");
            queryRetrievePatientRootInformationModel.AddToInformationModel(dicomFile);

            DicomMessage cMoveRequest = new DicomMessage(DimseCommand.CMOVERQ);

            cMoveRequest.Set("0x00000002", VR.UI, "1.2.840.10008.5.1.4.1.2.1.2");
            cMoveRequest.Set("0x00000600", VR.AE, "MOVE_DESTINATION");
            cMoveRequest.Set("0x00080052", VR.CS, "STUDY");
            cMoveRequest.Set("0x00100020", VR.LO, "1");
            cMoveRequest.Set("0x0020000D", VR.UI, "1.3", "1.1");

            DvtkData.Collections.StringCollection fileNames = queryRetrievePatientRootInformationModel.RetrieveInformationModel(cMoveRequest);

            replacedert.That(fileNames.Count, Is.EqualTo(2));
        }

[Test]
        public void Ticket788_15_1()
        {
            DicomFile dicomFile = null;

            QueryRetrievePatientRootInformationModel queryRetrievePatientRootInformationModel = new QueryRetrievePatientRootInformationModel();

            dicomFile = new DicomFile();
            dicomFile.DataSet.Set("0x00100020", VR.LO, "1");
            dicomFile.DataSet.Set("0x0020000D", VR.UI, "1.1");
            dicomFile.DataSet.Set("0x0020000E", VR.UI, "1.1.1");
            dicomFile.DataSet.Set("0x00080018", VR.UI, "1.1.1.1");
            queryRetrievePatientRootInformationModel.AddToInformationModel(dicomFile);

            dicomFile = new DicomFile();
            dicomFile.DataSet.Set("0x00100020", VR.LO, "1");
            dicomFile.DataSet.Set("0x0020000D", VR.UI, "1.1");
            dicomFile.DataSet.Set("0x0020000E", VR.UI, "1.1.2");
            dicomFile.DataSet.Set("0x00080018", VR.UI, "1.1.2.1");
            queryRetrievePatientRootInformationModel.AddToInformationModel(dicomFile);

            dicomFile = new DicomFile();
            dicomFile.DataSet.Set("0x00100020", VR.LO, "1");
            dicomFile.DataSet.Set("0x0020000D", VR.UI, "1.1");
            dicomFile.DataSet.Set("0x0020000E", VR.UI, "1.1.3");
            dicomFile.DataSet.Set("0x00080018", VR.UI, "1.1.3.1");
            queryRetrievePatientRootInformationModel.AddToInformationModel(dicomFile);

            DicomMessage cMoveRequest = new DicomMessage(DimseCommand.CMOVERQ);

            cMoveRequest.Set("0x00000002", VR.UI, "1.2.840.10008.5.1.4.1.2.1.2");
            cMoveRequest.Set("0x00000600", VR.AE, "MOVE_DESTINATION");
            cMoveRequest.Set("0x00080052", VR.CS, "SERIES");
            cMoveRequest.Set("0x00100020", VR.LO, "1");
            cMoveRequest.Set("0x0020000D", VR.UI, "1.1");
            cMoveRequest.Set("0x0020000E", VR.UI, "1.1.1", "1.1.3");

            DvtkData.Collections.StringCollection fileNames = queryRetrievePatientRootInformationModel.RetrieveInformationModel(cMoveRequest);

            replacedert.That(fileNames.Count, Is.EqualTo(2));
        }

[Test]
        public void Ticket788_16_1()
        {
            DicomFile dicomFile = null;

            QueryRetrievePatientRootInformationModel queryRetrievePatientRootInformationModel = new QueryRetrievePatientRootInformationModel();

            dicomFile = new DicomFile();
            dicomFile.DataSet.Set("0x00100020", VR.LO, "1");
            dicomFile.DataSet.Set("0x0020000D", VR.UI, "1.1");
            dicomFile.DataSet.Set("0x0020000E", VR.UI, "1.1.1");
            dicomFile.DataSet.Set("0x00080018", VR.UI, "1.1.1.1");
            queryRetrievePatientRootInformationModel.AddToInformationModel(dicomFile);

            dicomFile = new DicomFile();
            dicomFile.DataSet.Set("0x00100020", VR.LO, "1");
            dicomFile.DataSet.Set("0x0020000D", VR.UI, "1.1");
            dicomFile.DataSet.Set("0x0020000E", VR.UI, "1.1.1");
            dicomFile.DataSet.Set("0x00080018", VR.UI, "1.1.1.2");
            queryRetrievePatientRootInformationModel.AddToInformationModel(dicomFile);

            dicomFile = new DicomFile();
            dicomFile.DataSet.Set("0x00100020", VR.LO, "1");
            dicomFile.DataSet.Set("0x0020000D", VR.UI, "1.1");
            dicomFile.DataSet.Set("0x0020000E", VR.UI, "1.1.1");
            dicomFile.DataSet.Set("0x00080018", VR.UI, "1.1.1.3");
            queryRetrievePatientRootInformationModel.AddToInformationModel(dicomFile);

            DicomMessage cMoveRequest = new DicomMessage(DimseCommand.CMOVERQ);

            cMoveRequest.Set("0x00000002", VR.UI, "1.2.840.10008.5.1.4.1.2.1.2");
            cMoveRequest.Set("0x00000600", VR.AE, "MOVE_DESTINATION");
            cMoveRequest.Set("0x00080052", VR.CS, "IMAGE");
            cMoveRequest.Set("0x00100020", VR.LO, "1");
            cMoveRequest.Set("0x0020000D", VR.UI, "1.1");
            cMoveRequest.Set("0x0020000E", VR.UI, "1.1.1");
            cMoveRequest.Set("0x00080018", VR.UI, "1.1.1.1", "1.1.1.3");

            DvtkData.Collections.StringCollection fileNames = queryRetrievePatientRootInformationModel.RetrieveInformationModel(cMoveRequest);

            replacedert.That(fileNames.Count, Is.EqualTo(2));
        }

[Test]
        public void Ticket788_29_1()
        {
            DicomFile dicomFile = null;

            QueryRetrievePatientRootInformationModel queryRetrievePatientRootInformationModel = new QueryRetrievePatientRootInformationModel();

            dicomFile = new DicomFile();
            dicomFile.DataSet.Set("0x00100020", VR.LO, "1");
            dicomFile.DataSet.Set("0x0020000D", VR.UI, "1.1");
            dicomFile.DataSet.Set("0x0020000E", VR.UI, "1.1.1");
            dicomFile.DataSet.Set("0x00200011", VR.IS, "-1234567894"); // # Series Number
            dicomFile.DataSet.Set("0x00080018", VR.UI, "1.1.1.1");
            queryRetrievePatientRootInformationModel.AddToInformationModel(dicomFile);

            dicomFile = new DicomFile();
            dicomFile.DataSet.Set("0x00100020", VR.LO, "2");
            dicomFile.DataSet.Set("0x0020000D", VR.UI, "2.1");
            dicomFile.DataSet.Set("0x0020000E", VR.UI, "2.1.1");
            dicomFile.DataSet.Set("0x00200011", VR.IS, "456"); // # Series Number
            dicomFile.DataSet.Set("0x00080018", VR.UI, "2.1.1.1");
            queryRetrievePatientRootInformationModel.AddToInformationModel(dicomFile);

            DicomMessage cFindRequest = new DicomMessage(DimseCommand.CFINDRQ);
            cFindRequest.CommandSet.Set("0x00000002", VR.UI, "1.2.840.10008.5.1.4.1.2.1.1"); // Set Affected SOP clreplaced to Patient Root Query/Retrieve Information Model � FIND
            cFindRequest.DataSet.Set("0x00080052", VR.CS, "SERIES"); // Query Retrieve Level.
            cFindRequest.DataSet.Set("0x00100020", VR.LO, "1");
            cFindRequest.DataSet.Set("0x0020000D", VR.UI, "1.1");
            cFindRequest.DataSet.Set("0x0020000E", VR.UI);
            cFindRequest.DataSet.Set("0x00200011", VR.IS, "-1234567894");

            DicomMessageCollection responses = queryRetrievePatientRootInformationModel.QueryInformationModel(cFindRequest);

            // Expect one message with status pending and on message with status success.
            replacedert.That(responses.Count, Is.EqualTo(2));
        }

[Test]
        public void Ticket788_30_1()
        {
            DicomFile dicomFile = null;

            QueryRetrievePatientRootInformationModel queryRetrievePatientRootInformationModel = new QueryRetrievePatientRootInformationModel();

            dicomFile = new DicomFile();
            dicomFile.DataSet.Set("0x00100020", VR.LO, "1");
            dicomFile.DataSet.Set("0x0020000D", VR.UI, "1.1");
            dicomFile.DataSet.Set("0x0020000E", VR.UI, "1.1.1");
            dicomFile.DataSet.Set("0x00200011", VR.IS, "-1234567894"); // # Series Number
            dicomFile.DataSet.Set("0x00080018", VR.UI, "1.1.1.1");
            queryRetrievePatientRootInformationModel.AddToInformationModel(dicomFile);

            dicomFile = new DicomFile();
            dicomFile.DataSet.Set("0x00100020", VR.LO, "2");
            dicomFile.DataSet.Set("0x0020000D", VR.UI, "2.1");
            dicomFile.DataSet.Set("0x0020000E", VR.UI, "2.1.1");
            dicomFile.DataSet.Set("0x00200011", VR.IS, "456"); // # Series Number
            dicomFile.DataSet.Set("0x00080018", VR.UI, "2.1.1.1");
            queryRetrievePatientRootInformationModel.AddToInformationModel(dicomFile);

            DicomMessage cFindRequest = new DicomMessage(DimseCommand.CFINDRQ);
            cFindRequest.CommandSet.Set("0x00000002", VR.UI, "1.2.840.10008.5.1.4.1.2.1.1"); // Set Affected SOP clreplaced to Patient Root Query/Retrieve Information Model � FIND
            cFindRequest.DataSet.Set("0x00080052", VR.CS, "SERIES"); // Query Retrieve Level.
            cFindRequest.DataSet.Set("0x00100020", VR.LO, "1");
            cFindRequest.DataSet.Set("0x0020000D", VR.UI, "1.1");
            cFindRequest.DataSet.Set("0x0020000E", VR.UI);
            cFindRequest.DataSet.Set("0x00200011", VR.IS, "-999");

            DicomMessageCollection responses = queryRetrievePatientRootInformationModel.QueryInformationModel(cFindRequest);

            // Expect one message with status success.
            replacedert.That(responses.Count, Is.EqualTo(1));
        }

[Test]
        public void Ticket788_31_1()
        {
            DicomFile dicomFile = null;

            QueryRetrievePatientRootInformationModel queryRetrievePatientRootInformationModel = new QueryRetrievePatientRootInformationModel();

            dicomFile = new DicomFile();
            dicomFile.DataSet.Set("0x00100020", VR.LO, "1");
            dicomFile.DataSet.Set("0x0020000D", VR.UI, "1.1");
            dicomFile.DataSet.Set("0x0020000E", VR.UI, "1.1.1");
            dicomFile.DataSet.Set("0x00080060", VR.CS, "OT"); // # Modality
            dicomFile.DataSet.Set("0x00080018", VR.UI, "1.1.1.1");
            queryRetrievePatientRootInformationModel.AddToInformationModel(dicomFile);

            dicomFile = new DicomFile();
            dicomFile.DataSet.Set("0x00100020", VR.LO, "2");
            dicomFile.DataSet.Set("0x0020000D", VR.UI, "2.1");
            dicomFile.DataSet.Set("0x0020000E", VR.UI, "2.1.1");
            dicomFile.DataSet.Set("0x00080060", VR.CS, "XA"); // # Modality
            dicomFile.DataSet.Set("0x00080018", VR.UI, "2.1.1.1");
            queryRetrievePatientRootInformationModel.AddToInformationModel(dicomFile);

            DicomMessage cFindRequest = new DicomMessage(DimseCommand.CFINDRQ);
            cFindRequest.CommandSet.Set("0x00000002", VR.UI, "1.2.840.10008.5.1.4.1.2.1.1"); // Set Affected SOP clreplaced to Patient Root Query/Retrieve Information Model � FIND
            cFindRequest.DataSet.Set("0x00080052", VR.CS, "SERIES"); // Query Retrieve Level.
            cFindRequest.DataSet.Set("0x00100020", VR.LO, "1");
            cFindRequest.DataSet.Set("0x0020000D", VR.UI, "1.1");
            cFindRequest.DataSet.Set("0x0020000E", VR.UI);
            cFindRequest.DataSet.Set("0x00080060", VR.CS, "OT");

            DicomMessageCollection responses = queryRetrievePatientRootInformationModel.QueryInformationModel(cFindRequest);

            // Expect one message with status pending and on message with status success.
            replacedert.That(responses.Count, Is.EqualTo(2));
        }

[Test]
        public void Ticket788_32_1()
        {
            DicomFile dicomFile = null;

            QueryRetrievePatientRootInformationModel queryRetrievePatientRootInformationModel = new QueryRetrievePatientRootInformationModel();

            dicomFile = new DicomFile();
            dicomFile.DataSet.Set("0x00100020", VR.LO, "1");
            dicomFile.DataSet.Set("0x0020000D", VR.UI, "1.1");
            dicomFile.DataSet.Set("0x0020000E", VR.UI, "1.1.1");
            dicomFile.DataSet.Set("0x00080060", VR.CS, "OT"); // # Modality
            dicomFile.DataSet.Set("0x00080018", VR.UI, "1.1.1.1");
            queryRetrievePatientRootInformationModel.AddToInformationModel(dicomFile);

            dicomFile = new DicomFile();
            dicomFile.DataSet.Set("0x00100020", VR.LO, "2");
            dicomFile.DataSet.Set("0x0020000D", VR.UI, "2.1");
            dicomFile.DataSet.Set("0x0020000E", VR.UI, "2.1.1");
            dicomFile.DataSet.Set("0x00080060", VR.CS, "XA"); // # Modality
            dicomFile.DataSet.Set("0x00080018", VR.UI, "2.1.1.1");
            queryRetrievePatientRootInformationModel.AddToInformationModel(dicomFile);

            DicomMessage cFindRequest = new DicomMessage(DimseCommand.CFINDRQ);
            cFindRequest.CommandSet.Set("0x00000002", VR.UI, "1.2.840.10008.5.1.4.1.2.1.1"); // Set Affected SOP clreplaced to Patient Root Query/Retrieve Information Model � FIND
            cFindRequest.DataSet.Set("0x00080052", VR.CS, "SERIES"); // Query Retrieve Level.
            cFindRequest.DataSet.Set("0x00100020", VR.LO, "1");
            cFindRequest.DataSet.Set("0x0020000D", VR.UI, "1.1");
            cFindRequest.DataSet.Set("0x0020000E", VR.UI);
            cFindRequest.DataSet.Set("0x00080060", VR.CS, "ECG");

            DicomMessageCollection responses = queryRetrievePatientRootInformationModel.QueryInformationModel(cFindRequest);

            // Expect one message with status success.
            replacedert.That(responses.Count, Is.EqualTo(1));
        }

[Test]
        public void Ticket1361_1_1()
        {
            DicomFile dicomFile = null;

            QueryRetrievePatientRootInformationModel queryRetrievePatientRootInformationModel = new QueryRetrievePatientRootInformationModel();

            dicomFile = new DicomFile();
            dicomFile.DataSet.Set("0x00100020", VR.LO, "1");
            dicomFile.DataSet.Set("0x0020000D", VR.UI, "1.1");
            dicomFile.DataSet.Set("0x0020000E", VR.UI, "1.1.1");
            dicomFile.DataSet.Set("0x00080018", VR.UI, "1.1.1.1");
            queryRetrievePatientRootInformationModel.AddToInformationModel(dicomFile,false);

            dicomFile = new DicomFile();
            dicomFile.DataSet.Set("0x00100020", VR.LO, "2");
            dicomFile.DataSet.Set("0x0020000D", VR.UI, "2.1");
            dicomFile.DataSet.Set("0x0020000E", VR.UI, "2.1.1");
            dicomFile.DataSet.Set("0x00080018", VR.UI, "2.1.1.1");
            queryRetrievePatientRootInformationModel.AddToInformationModel(dicomFile, false);

            dicomFile = new DicomFile();
            dicomFile.DataSet.Set("0x00100020", VR.LO, "3");
            dicomFile.DataSet.Set("0x0020000D", VR.UI, "3.1");
            dicomFile.DataSet.Set("0x0020000E", VR.UI, "3.1.1");
            dicomFile.DataSet.Set("0x00080018", VR.UI, "3.1.1.1");
            queryRetrievePatientRootInformationModel.AddToInformationModel(dicomFile, false);

            DicomMessage cMoveRequest = new DicomMessage(DimseCommand.CMOVERQ);

            cMoveRequest.Set("0x00000002", VR.UI, "1.2.840.10008.5.1.4.1.2.1.2");
            cMoveRequest.Set("0x00000600", VR.AE, "MOVE_DESTINATION");
            cMoveRequest.Set("0x00080052", VR.CS, "PATIENT");
            cMoveRequest.Set("0x00100020", VR.LO, "2");

            DvtkData.Collections.StringCollection fileNames = queryRetrievePatientRootInformationModel.RetrieveInformationModel(cMoveRequest);

            replacedert.That(fileNames.Count, Is.EqualTo(0));
        }

[Test]
        public void Ticket1361_2_1()
        {
            DicomFile dicomFile = null;

            QueryRetrievePatientRootInformationModel queryRetrievePatientRootInformationModel = new QueryRetrievePatientRootInformationModel();

            dicomFile = new DicomFile();
            dicomFile.DataSet.Set("0x00100020", VR.LO, "1");
            dicomFile.DataSet.Set("0x0020000D", VR.UI, "1.1");
            dicomFile.DataSet.Set("0x0020000E", VR.UI, "1.1.1");
            dicomFile.DataSet.Set("0x00080018", VR.UI, "1.1.1.1");
            queryRetrievePatientRootInformationModel.AddToInformationModel(dicomFile, false);

            dicomFile = new DicomFile();
            dicomFile.DataSet.Set("0x00100020", VR.LO, "1");
            dicomFile.DataSet.Set("0x0020000D", VR.UI, "1.2");
            dicomFile.DataSet.Set("0x0020000E", VR.UI, "1.2.1");
            dicomFile.DataSet.Set("0x00080018", VR.UI, "1.2.1.1");
            queryRetrievePatientRootInformationModel.AddToInformationModel(dicomFile, false);

            dicomFile = new DicomFile();
            dicomFile.DataSet.Set("0x00100020", VR.LO, "1");
            dicomFile.DataSet.Set("0x0020000D", VR.UI, "1.3");
            dicomFile.DataSet.Set("0x0020000E", VR.UI, "1.3.1");
            dicomFile.DataSet.Set("0x00080018", VR.UI, "1.3.1.1");
            queryRetrievePatientRootInformationModel.AddToInformationModel(dicomFile, false);

            DicomMessage cMoveRequest = new DicomMessage(DimseCommand.CMOVERQ);

            cMoveRequest.Set("0x00000002", VR.UI, "1.2.840.10008.5.1.4.1.2.1.2");
            cMoveRequest.Set("0x00000600", VR.AE, "MOVE_DESTINATION");
            cMoveRequest.Set("0x00080052", VR.CS, "STUDY");
            cMoveRequest.Set("0x00100020", VR.LO, "1");
            cMoveRequest.Set("0x0020000D", VR.UI, "1.3", "1.1");

            DvtkData.Collections.StringCollection fileNames = queryRetrievePatientRootInformationModel.RetrieveInformationModel(cMoveRequest);

            replacedert.That(fileNames.Count, Is.EqualTo(0));
        }

[Test]
        public void Ticket1361_3_1()
        {
            DicomFile dicomFile = null;

            QueryRetrievePatientRootInformationModel queryRetrievePatientRootInformationModel = new QueryRetrievePatientRootInformationModel();

            dicomFile = new DicomFile();
            dicomFile.DataSet.Set("0x00100020", VR.LO, "1");
            dicomFile.DataSet.Set("0x0020000D", VR.UI, "1.1");
            dicomFile.DataSet.Set("0x0020000E", VR.UI, "1.1.1");
            dicomFile.DataSet.Set("0x00080018", VR.UI, "1.1.1.1");
            queryRetrievePatientRootInformationModel.AddToInformationModel(dicomFile, false);

            dicomFile = new DicomFile();
            dicomFile.DataSet.Set("0x00100020", VR.LO, "1");
            dicomFile.DataSet.Set("0x0020000D", VR.UI, "1.1");
            dicomFile.DataSet.Set("0x0020000E", VR.UI, "1.1.2");
            dicomFile.DataSet.Set("0x00080018", VR.UI, "1.1.2.1");
            queryRetrievePatientRootInformationModel.AddToInformationModel(dicomFile, false);

            dicomFile = new DicomFile();
            dicomFile.DataSet.Set("0x00100020", VR.LO, "1");
            dicomFile.DataSet.Set("0x0020000D", VR.UI, "1.1");
            dicomFile.DataSet.Set("0x0020000E", VR.UI, "1.1.3");
            dicomFile.DataSet.Set("0x00080018", VR.UI, "1.1.3.1");
            queryRetrievePatientRootInformationModel.AddToInformationModel(dicomFile, false);

            DicomMessage cMoveRequest = new DicomMessage(DimseCommand.CMOVERQ);

            cMoveRequest.Set("0x00000002", VR.UI, "1.2.840.10008.5.1.4.1.2.1.2");
            cMoveRequest.Set("0x00000600", VR.AE, "MOVE_DESTINATION");
            cMoveRequest.Set("0x00080052", VR.CS, "SERIES");
            cMoveRequest.Set("0x00100020", VR.LO, "1");
            cMoveRequest.Set("0x0020000D", VR.UI, "1.1");
            cMoveRequest.Set("0x0020000E", VR.UI, "1.1.1", "1.1.3");

            DvtkData.Collections.StringCollection fileNames = queryRetrievePatientRootInformationModel.RetrieveInformationModel(cMoveRequest);

            replacedert.That(fileNames.Count, Is.EqualTo(0));
        }

[Test]
        public void Ticket1361_4_1()
        {
            DicomFile dicomFile = null;

            QueryRetrievePatientRootInformationModel queryRetrievePatientRootInformationModel = new QueryRetrievePatientRootInformationModel();

            dicomFile = new DicomFile();
            dicomFile.DataSet.Set("0x00100020", VR.LO, "1");
            dicomFile.DataSet.Set("0x0020000D", VR.UI, "1.1");
            dicomFile.DataSet.Set("0x0020000E", VR.UI, "1.1.1");
            dicomFile.DataSet.Set("0x00080018", VR.UI, "1.1.1.1");
            queryRetrievePatientRootInformationModel.AddToInformationModel(dicomFile, false);

            dicomFile = new DicomFile();
            dicomFile.DataSet.Set("0x00100020", VR.LO, "1");
            dicomFile.DataSet.Set("0x0020000D", VR.UI, "1.1");
            dicomFile.DataSet.Set("0x0020000E", VR.UI, "1.1.1");
            dicomFile.DataSet.Set("0x00080018", VR.UI, "1.1.1.2");
            queryRetrievePatientRootInformationModel.AddToInformationModel(dicomFile, false);

            dicomFile = new DicomFile();
            dicomFile.DataSet.Set("0x00100020", VR.LO, "1");
            dicomFile.DataSet.Set("0x0020000D", VR.UI, "1.1");
            dicomFile.DataSet.Set("0x0020000E", VR.UI, "1.1.1");
            dicomFile.DataSet.Set("0x00080018", VR.UI, "1.1.1.3");
            queryRetrievePatientRootInformationModel.AddToInformationModel(dicomFile, false);

            DicomMessage cMoveRequest = new DicomMessage(DimseCommand.CMOVERQ);

            cMoveRequest.Set("0x00000002", VR.UI, "1.2.840.10008.5.1.4.1.2.1.2");
            cMoveRequest.Set("0x00000600", VR.AE, "MOVE_DESTINATION");
            cMoveRequest.Set("0x00080052", VR.CS, "IMAGE");
            cMoveRequest.Set("0x00100020", VR.LO, "1");
            cMoveRequest.Set("0x0020000D", VR.UI, "1.1");
            cMoveRequest.Set("0x0020000E", VR.UI, "1.1.1");
            cMoveRequest.Set("0x00080018", VR.UI, "1.1.1.1", "1.1.1.3");

            DvtkData.Collections.StringCollection fileNames = queryRetrievePatientRootInformationModel.RetrieveInformationModel(cMoveRequest);

            replacedert.That(fileNames.Count, Is.EqualTo(0));
        }

[Test]
        public void Ticket788_1_1()
        {
            DicomFile dicomFile = null;

            QueryRetrieveStudyRootInformationModel queryRetrieveStudyRootInformationModel = new QueryRetrieveStudyRootInformationModel();

            dicomFile = new DicomFile();
            dicomFile.DataSet.Set("0x00100020", VR.LO, "1");
            dicomFile.DataSet.Set("0x0020000D", VR.UI, "1.1");
            dicomFile.DataSet.Set("0x0020000E", VR.UI, "1.1.1");
            dicomFile.DataSet.Set("0x00080018", VR.UI, "1.1.1.1");
            queryRetrieveStudyRootInformationModel.AddToInformationModel(dicomFile);

            dicomFile = new DicomFile();
            dicomFile.DataSet.Set("0x00100020", VR.LO, "1");
            dicomFile.DataSet.Set("0x0020000D", VR.UI, "1.2");
            dicomFile.DataSet.Set("0x0020000E", VR.UI, "1.2.1");
            dicomFile.DataSet.Set("0x00080018", VR.UI, "1.2.1.1");
            queryRetrieveStudyRootInformationModel.AddToInformationModel(dicomFile);

            dicomFile = new DicomFile();
            dicomFile.DataSet.Set("0x00100020", VR.LO, "1");
            dicomFile.DataSet.Set("0x0020000D", VR.UI, "1.3");
            dicomFile.DataSet.Set("0x0020000E", VR.UI, "1.3.1");
            dicomFile.DataSet.Set("0x00080018", VR.UI, "1.3.1.1");
            queryRetrieveStudyRootInformationModel.AddToInformationModel(dicomFile);

            DicomMessage cMoveRequest = new DicomMessage(Dimse.CMOVERQ);

            cMoveRequest.Set("0x00000002", VR.UI, "1.2.840.10008.5.1.4.1.2.2.2");
            cMoveRequest.Set("0x00000600", VR.AE, "MOVE_DESTINATION");
            cMoveRequest.Set("0x00080052", VR.CS, "STUDY");
            cMoveRequest.Set("0x0020000D", VR.UI, "1.3", "1.1");

            DvtkData.Collections.StringCollection fileNames = queryRetrieveStudyRootInformationModel.RetrieveInformationModel(cMoveRequest);

            replacedert.That(fileNames.Count, Is.EqualTo(2));
        }

[Test]
        public void Ticket788_2_1()
        {
            DicomFile dicomFile = null;

            QueryRetrieveStudyRootInformationModel queryRetrieveStudyRootInformationModel = new QueryRetrieveStudyRootInformationModel();

            dicomFile = new DicomFile();
            dicomFile.DataSet.Set("0x00100020", VR.LO, "1");
            dicomFile.DataSet.Set("0x0020000D", VR.UI, "1.1");
            dicomFile.DataSet.Set("0x0020000E", VR.UI, "1.1.1");
            dicomFile.DataSet.Set("0x00080018", VR.UI, "1.1.1.1");
            queryRetrieveStudyRootInformationModel.AddToInformationModel(dicomFile);

            dicomFile = new DicomFile();
            dicomFile.DataSet.Set("0x00100020", VR.LO, "1");
            dicomFile.DataSet.Set("0x0020000D", VR.UI, "1.1");
            dicomFile.DataSet.Set("0x0020000E", VR.UI, "1.1.2");
            dicomFile.DataSet.Set("0x00080018", VR.UI, "1.1.2.1");
            queryRetrieveStudyRootInformationModel.AddToInformationModel(dicomFile);

            dicomFile = new DicomFile();
            dicomFile.DataSet.Set("0x00100020", VR.LO, "1");
            dicomFile.DataSet.Set("0x0020000D", VR.UI, "1.1");
            dicomFile.DataSet.Set("0x0020000E", VR.UI, "1.1.3");
            dicomFile.DataSet.Set("0x00080018", VR.UI, "1.1.3.1");
            queryRetrieveStudyRootInformationModel.AddToInformationModel(dicomFile);

            DicomMessage cMoveRequest = new DicomMessage(Dimse.CMOVERQ);

            cMoveRequest.Set("0x00000002", VR.UI, "1.2.840.10008.5.1.4.1.2.2.2");
            cMoveRequest.Set("0x00000600", VR.AE, "MOVE_DESTINATION");
            cMoveRequest.Set("0x00080052", VR.CS, "SERIES");
            cMoveRequest.Set("0x0020000D", VR.UI, "1.1");
            cMoveRequest.Set("0x0020000E", VR.UI, "1.1.1", "1.1.3");

            DvtkData.Collections.StringCollection fileNames = queryRetrieveStudyRootInformationModel.RetrieveInformationModel(cMoveRequest);

            replacedert.That(fileNames.Count, Is.EqualTo(2));
        }

[Test]
        public void Ticket788_3_1()
        {
            DicomFile dicomFile = null;

            QueryRetrieveStudyRootInformationModel queryRetrieveStudyRootInformationModel = new QueryRetrieveStudyRootInformationModel();

            dicomFile = new DicomFile();
            dicomFile.Set("0x00100020", VR.LO, "1");
            dicomFile.Set("0x0020000D", VR.UI, "1.1");
            dicomFile.Set("0x0020000E", VR.UI, "1.1.1");
            dicomFile.Set("0x00080018", VR.UI, "1.1.1.1");
            queryRetrieveStudyRootInformationModel.AddToInformationModel(dicomFile);

            dicomFile = new DicomFile();
            dicomFile.Set("0x00100020", VR.LO, "1");
            dicomFile.Set("0x0020000D", VR.UI, "1.1");
            dicomFile.Set("0x0020000E", VR.UI, "1.1.1");
            dicomFile.Set("0x00080018", VR.UI, "1.1.1.2");
            queryRetrieveStudyRootInformationModel.AddToInformationModel(dicomFile);

            dicomFile = new DicomFile();
            dicomFile.Set("0x00100020", VR.LO, "1");
            dicomFile.Set("0x0020000D", VR.UI, "1.1");
            dicomFile.Set("0x0020000E", VR.UI, "1.1.1");
            dicomFile.Set("0x00080018", VR.UI, "1.1.1.3");
            queryRetrieveStudyRootInformationModel.AddToInformationModel(dicomFile);

            DicomMessage cMoveRequest = new DicomMessage(Dimse.CMOVERQ);

            cMoveRequest.Set("0x00000002", VR.UI, "1.2.840.10008.5.1.4.1.2.2.2");
            cMoveRequest.Set("0x00000600", VR.AE, "MOVE_DESTINATION");
            cMoveRequest.Set("0x00080052", VR.CS, "IMAGE");
            cMoveRequest.Set("0x0020000D", VR.UI, "1.1");
            cMoveRequest.Set("0x0020000E", VR.UI, "1.1.1");
            cMoveRequest.Set("0x00080018", VR.UI, "1.1.1.1", "1.1.1.3");

            DvtkData.Collections.StringCollection fileNames = queryRetrieveStudyRootInformationModel.RetrieveInformationModel(cMoveRequest);

            replacedert.That(fileNames.Count, Is.EqualTo(2));
        }

[Test]
        public void Ticket788_1_1()
        {
            DicomFile dicomFile = null;

            QueryRetrievePatientStudyOnlyInformationModel queryRetrievePatientStudyOnlyInformationModel = new QueryRetrievePatientStudyOnlyInformationModel();

            dicomFile = new DicomFile();
            dicomFile.DataSet.Set("0x00100020", VR.LO, "1");
            dicomFile.DataSet.Set("0x0020000D", VR.UI, "1.1");
            dicomFile.DataSet.Set("0x0020000E", VR.UI, "1.1.1");
            dicomFile.DataSet.Set("0x00080018", VR.UI, "1.1.1.1");
            queryRetrievePatientStudyOnlyInformationModel.AddToInformationModel(dicomFile);

            dicomFile = new DicomFile();
            dicomFile.DataSet.Set("0x00100020", VR.LO, "2");
            dicomFile.DataSet.Set("0x0020000D", VR.UI, "2.1");
            dicomFile.DataSet.Set("0x0020000E", VR.UI, "2.1.1");
            dicomFile.DataSet.Set("0x00080018", VR.UI, "2.1.1.1");
            queryRetrievePatientStudyOnlyInformationModel.AddToInformationModel(dicomFile);

            dicomFile = new DicomFile();
            dicomFile.DataSet.Set("0x00100020", VR.LO, "3");
            dicomFile.DataSet.Set("0x0020000D", VR.UI, "3.1");
            dicomFile.DataSet.Set("0x0020000E", VR.UI, "3.1.1");
            dicomFile.DataSet.Set("0x00080018", VR.UI, "3.1.1.1");
            queryRetrievePatientStudyOnlyInformationModel.AddToInformationModel(dicomFile);

            DicomMessage cMoveRequest = new DicomMessage(Dimse.CMOVERQ);

            cMoveRequest.Set("0x00000002", VR.UI, "1.2.840.10008.5.1.4.1.2.3.2");
            cMoveRequest.Set("0x00000600", VR.AE, "MOVE_DESTINATION");
            cMoveRequest.Set("0x00080052", VR.CS, "PATIENT");
            cMoveRequest.Set("0x00100020", VR.LO, "2");

            DvtkData.Collections.StringCollection fileNames = queryRetrievePatientStudyOnlyInformationModel.RetrieveInformationModel(cMoveRequest);

            replacedert.That(fileNames.Count, Is.EqualTo(1));
        }

[Test]
        public void Ticket788_2_1()
        {
            DicomFile dicomFile = null;

            QueryRetrievePatientStudyOnlyInformationModel queryRetrievePatientStudyOnlyInformationModel = new QueryRetrievePatientStudyOnlyInformationModel();

            dicomFile = new DicomFile();
            dicomFile.DataSet.Set("0x00100020", VR.LO, "1");
            dicomFile.DataSet.Set("0x0020000D", VR.UI, "1.1");
            dicomFile.DataSet.Set("0x0020000E", VR.UI, "1.1.1");
            dicomFile.DataSet.Set("0x00080018", VR.UI, "1.1.1.1");
            queryRetrievePatientStudyOnlyInformationModel.AddToInformationModel(dicomFile);

            dicomFile = new DicomFile();
            dicomFile.DataSet.Set("0x00100020", VR.LO, "1");
            dicomFile.DataSet.Set("0x0020000D", VR.UI, "1.2");
            dicomFile.DataSet.Set("0x0020000E", VR.UI, "1.2.1");
            dicomFile.DataSet.Set("0x00080018", VR.UI, "1.2.1.1");
            queryRetrievePatientStudyOnlyInformationModel.AddToInformationModel(dicomFile);

            dicomFile = new DicomFile();
            dicomFile.DataSet.Set("0x00100020", VR.LO, "1");
            dicomFile.DataSet.Set("0x0020000D", VR.UI, "1.3");
            dicomFile.DataSet.Set("0x0020000E", VR.UI, "1.3.1");
            dicomFile.DataSet.Set("0x00080018", VR.UI, "1.3.1.1");
            queryRetrievePatientStudyOnlyInformationModel.AddToInformationModel(dicomFile);

            DicomMessage cMoveRequest = new DicomMessage(Dimse.CMOVERQ);

            cMoveRequest.Set("0x00000002", VR.UI, "1.2.840.10008.5.1.4.1.2.3.2");
            cMoveRequest.Set("0x00000600", VR.AE, "MOVE_DESTINATION");
            cMoveRequest.Set("0x00080052", VR.CS, "STUDY");
            cMoveRequest.Set("0x00100020", VR.LO, "1");
            cMoveRequest.Set("0x0020000D", VR.UI, "1.3", "1.1");

            DvtkData.Collections.StringCollection fileNames = queryRetrievePatientStudyOnlyInformationModel.RetrieveInformationModel(cMoveRequest);

            replacedert.That(fileNames.Count, Is.EqualTo(2));
        }

19 View Source File : AttributeCollections_NUnit.cs
License : GNU Lesser General Public License v2.1
Project Creator : dvtk-org

[Test]
        public void Count()
        {
            replacedert.That(attributeCollections.Count, Is.EqualTo(0));
        }

19 View Source File : AttributeCollections_NUnit.cs
License : GNU Lesser General Public License v2.1
Project Creator : dvtk-org

[Test]
        public void NotNullCount()
        {
            replacedert.That(attributeCollections.Count, Is.EqualTo(attributeCollections.NotNullCount));
        }

19 View Source File : CompareRule_NUnit.cs
License : GNU Lesser General Public License v2.1
Project Creator : dvtk-org

[Test]
        public void ArrayRepresentation()
        {
            replacedert.That(compareRule.ArrayRepresentation, Is.TypeOf(typeof(ValidationRuleBase[])));
            replacedert.That(compareRule.ArrayRepresentation, Is.Empty);

            // TODO: test code below fails. Improve interface (description)?
            //compareRule.ArrayRepresentation = null; // exception!
            //replacedert.That(compareRule.ArrayRepresentation, Is.TypeOf(typeof(ValidationRuleBase)));
            //replacedert.That(compareRule.ArrayRepresentation, Is.Null);
        }

19 View Source File : DicomFile_NUnit.cs
License : GNU Lesser General Public License v2.1
Project Creator : dvtk-org

[Test]
        public void DataSet()
        {
            dicomFile.DataSet = new DvtkHighLevelInterface.Dicom.Other.DataSet(); 
            replacedert.That(dicomFile.DataSet.Count, Is.EqualTo(0));
        }

19 View Source File : FileMetaInformation_NUnit.cs
License : GNU Lesser General Public License v2.1
Project Creator : dvtk-org

[Test]
        public void Count()
        {
            // actual (default) value
            replacedert.That(fileMetaInformation.Count, Is.EqualTo(3));
        }

19 View Source File : FileMetaInformation_NUnit.cs
License : GNU Lesser General Public License v2.1
Project Creator : dvtk-org

[Test]
        public void DicomPrefix()
        {
            byte[] actualPrefix = fileMetaInformation.DicomPrefix;
            byte[] dicomPrefix = new System.Byte[4] { 68, 73, 67, 77 }; // DICM
            byte[] hl7Prefix = new System.Byte[3] { 72, 76, 37 }; // HL7
            byte[] noPrefix = new System.Byte[4] { 00, 00, 00, 00 };

            // actual (default) value
            replacedert.That(actualPrefix, Is.EqualTo(dicomPrefix));

            // null value exception
            try
            {
                fileMetaInformation.DicomPrefix = null;
            }
            catch (System.ArgumentNullException)
            {
            }

            // invalid value exception
            try
            {
                fileMetaInformation.DicomPrefix = hl7Prefix;
            }
            catch (System.ArgumentException)
            {
            }

            // actual value after exceptions
            replacedert.That(fileMetaInformation.DicomPrefix, Is.EqualTo(actualPrefix));

            // empty value
            fileMetaInformation.DicomPrefix = noPrefix;
            replacedert.That(fileMetaInformation.DicomPrefix, Is.EqualTo(noPrefix));

            // normal value
            fileMetaInformation.DicomPrefix = dicomPrefix;
            replacedert.That(fileMetaInformation.DicomPrefix, Is.EqualTo(dicomPrefix));
        }

19 View Source File : FileMetaInformation_NUnit.cs
License : GNU Lesser General Public License v2.1
Project Creator : dvtk-org

[Test]
        public void FilePreamble()
        {
            byte[] filePreamble = fileMetaInformation.FilePreamble;

            // actual (default) value
            replacedert.That(filePreamble, Is.All.EqualTo(0));

            // null value exception
            try
            {
                fileMetaInformation.FilePreamble = null;
            }
            catch (System.ArgumentNullException)
            {
            }

            // actual value after exceptions
            replacedert.That(fileMetaInformation.FilePreamble, Is.EqualTo(filePreamble));

            // new value
            filePreamble[1] = 1;
            fileMetaInformation.FilePreamble = filePreamble;
            replacedert.That(fileMetaInformation.FilePreamble, Is.EqualTo(filePreamble));
        }

19 View Source File : FileMetaInformation_NUnit.cs
License : GNU Lesser General Public License v2.1
Project Creator : dvtk-org

[Test]
        public void MediaStorageSOPClreplacedUID()
        {
            string mediaStorageSOPClreplacedUID;

            // actual (default) value
            replacedert.That(fileMetaInformation.MediaStorageSOPClreplacedUID, Is.Empty);

            // test invalid UID
            mediaStorageSOPClreplacedUID = "1,034.06 09A";
            fileMetaInformation.MediaStorageSOPClreplacedUID = mediaStorageSOPClreplacedUID;
            replacedert.That(fileMetaInformation.MediaStorageSOPClreplacedUID, Is.EqualTo(mediaStorageSOPClreplacedUID));

            // test valid UID
            mediaStorageSOPClreplacedUID = "1.2.840.10008.1.3.10";
            fileMetaInformation.MediaStorageSOPClreplacedUID = mediaStorageSOPClreplacedUID;
            replacedert.That(fileMetaInformation.MediaStorageSOPClreplacedUID, Is.EqualTo(mediaStorageSOPClreplacedUID));

            // test empty UID
            fileMetaInformation.MediaStorageSOPClreplacedUID = "";
            replacedert.That(fileMetaInformation.MediaStorageSOPClreplacedUID, Is.Empty);
        }

19 View Source File : FileMetaInformation_NUnit.cs
License : GNU Lesser General Public License v2.1
Project Creator : dvtk-org

[Test]
        public void MediaStorageSOPInstanceUID()
        {
            string mediaStorageSOPInstanceUID;

            // initial value
            replacedert.That(fileMetaInformation.MediaStorageSOPInstanceUID, Is.Empty);

            // test invalid UID
            mediaStorageSOPInstanceUID = "1,034.06 09A";
            fileMetaInformation.MediaStorageSOPInstanceUID = mediaStorageSOPInstanceUID;
            replacedert.That(fileMetaInformation.MediaStorageSOPInstanceUID, Is.EqualTo(mediaStorageSOPInstanceUID));

            // test valid UID
            mediaStorageSOPInstanceUID = "1.2.826.0.1.3680043.2.1545.1.2.3.1.1.1";
            fileMetaInformation.MediaStorageSOPInstanceUID = mediaStorageSOPInstanceUID;
            replacedert.That(fileMetaInformation.MediaStorageSOPInstanceUID, Is.EqualTo(mediaStorageSOPInstanceUID));

            // test empty UID
            fileMetaInformation.MediaStorageSOPInstanceUID = "";
            replacedert.That(fileMetaInformation.MediaStorageSOPInstanceUID, Is.Empty);
        }

19 View Source File : FileMetaInformation_NUnit.cs
License : GNU Lesser General Public License v2.1
Project Creator : dvtk-org

[Test]
        public void TransferSyntax()
        {
            string actualTransferSyntax = fileMetaInformation.TransferSyntax;
            string textualTransferSyntax = "Explicit Little Endian";

            // test actual value
            replacedert.That(actualTransferSyntax, Is.EqualTo("1.2.840.10008.1.2.1"));

            // test empty value
            fileMetaInformation.TransferSyntax = "";
            replacedert.That(fileMetaInformation.TransferSyntax, Is.Empty);

            // test text value
            fileMetaInformation.TransferSyntax = textualTransferSyntax;
            replacedert.That(fileMetaInformation.TransferSyntax, Is.EqualTo(textualTransferSyntax));

            // test initial (UID) value
            fileMetaInformation.TransferSyntax = actualTransferSyntax;
            replacedert.That(fileMetaInformation.TransferSyntax, Is.EqualTo(actualTransferSyntax));
        }

19 View Source File : FileMetaInformation_NUnit.cs
License : GNU Lesser General Public License v2.1
Project Creator : dvtk-org

[Test]
        public void Equals_object()
        {
            replacedert.That(fileMetaInformation.Equals(fileMetaInformation), Is.True);
        }

19 View Source File : FileMetaInformation_NUnit.cs
License : GNU Lesser General Public License v2.1
Project Creator : dvtk-org

[Test]
        public void Exists_tagSequence()
        {
            String tagSequence = "";

            replacedert.That(fileMetaInformation.Exists("0x00020000"), Is.False);
            replacedert.That(fileMetaInformation.Exists("0x00020001"), Is.True);
            replacedert.That(fileMetaInformation.Exists("0x00020010"), Is.True);
            replacedert.That(fileMetaInformation.Exists("0x00020012"), Is.True);

            // empty string exception
            try
            {
                replacedert.That(fileMetaInformation.Exists(tagSequence), Is.False);
            }
            catch (DvtkHighLevelInterface.Common.Other.HliException)
            {
            }
        }

19 View Source File : FileMetaInformation_NUnit.cs
License : GNU Lesser General Public License v2.1
Project Creator : dvtk-org

[Test]
        public void Gereplacedem_tagSequence_oneBasedIndex_1()
        {
            replacedert.That(fileMetaInformation.Gereplacedem("0x00020000", 1), Is.TypeOf(typeof(DvtkHighLevelInterface.Dicom.Other.SequenceItem)));
            replacedert.That(fileMetaInformation.Gereplacedem("0x00020001", 1), Is.TypeOf(typeof(DvtkHighLevelInterface.Dicom.Other.SequenceItem)));
            replacedert.That(fileMetaInformation.Gereplacedem("0x00020010", 1), Is.TypeOf(typeof(DvtkHighLevelInterface.Dicom.Other.SequenceItem)));
            replacedert.That(fileMetaInformation.Gereplacedem("0x00020012", 1), Is.TypeOf(typeof(DvtkHighLevelInterface.Dicom.Other.SequenceItem)));
        }

19 View Source File : FileMetaInformation_NUnit.cs
License : GNU Lesser General Public License v2.1
Project Creator : dvtk-org

[Test]
        public void GereplacedemCount_tagSequence_1()
        {
            replacedert.That(fileMetaInformation.GereplacedemCount("0x00020000"), Is.EqualTo(0));
            replacedert.That(fileMetaInformation.GereplacedemCount("0x00020001"), Is.EqualTo(0));
            replacedert.That(fileMetaInformation.GereplacedemCount("0x00020010"), Is.EqualTo(0));
            replacedert.That(fileMetaInformation.GereplacedemCount("0x00020012"), Is.EqualTo(0));
        }

19 View Source File : FileMetaInformation_NUnit.cs
License : GNU Lesser General Public License v2.1
Project Creator : dvtk-org

[Test]
        public void GetValues_tagSequence()
        {
            bool isExceptionThrown = false;

            try
            {
                String tagSequence = "";

                replacedert.That(fileMetaInformation.GetValues(tagSequence), Is.TypeOf(typeof(Values)) & Is.Null);
            }
            catch
            {
                isExceptionThrown = true;
            }

            replacedert.That(isExceptionThrown, Is.EqualTo(true));
        }

19 View Source File : AssociateRq_NUnit.cs
License : GNU Lesser General Public License v2.1
Project Creator : dvtk-org

[Test]
        public void Ticket1283_1_1()
        {
            Ticket1283_1();

            replacedert.That(this.ticket1283_1_ReceivedreplacedociateRq.CallingAEreplacedle.TrimEnd(' '), Is.EqualTo("CALLINGAEreplacedLE1"));
        }

19 View Source File : AssociateRq_NUnit.cs
License : GNU Lesser General Public License v2.1
Project Creator : dvtk-org

[Test]
        public void Ticket1283_1_2()
        {
            Ticket1283_1();

            replacedert.That(this.ticket1283_1_ReceivedreplacedociateRq.CalledAEreplacedle.TrimEnd(' '), Is.EqualTo("CALLEDAEreplacedLE1"));
        }

19 View Source File : DicomMessage_NUnit.cs
License : GNU Lesser General Public License v2.1
Project Creator : dvtk-org

[Test]
        public void Ticket1293_1_1()
        {
            ThreadManager threadManager = new ThreadManager();

            Ticket1293MainDicomThread ticket1293MainDicomThread = new Ticket1293MainDicomThread("1.2.840.10008.1.2");

            ticket1293MainDicomThread.Initialize(threadManager);

            Config.SetOptions(ticket1293MainDicomThread, "Ticket1293", "Main 1.2.840.10008.1.2");

            HliForm hliForm = new HliForm();
            hliForm.Attach(ticket1293MainDicomThread);

            ticket1293MainDicomThread.Start();

            ticket1293MainDicomThread.WaitForCompletion();

            replacedert.That(ticket1293MainDicomThread.NrOfErrors + ticket1293MainDicomThread.NrOfWarnings, Is.EqualTo(0));

        }

19 View Source File : DicomMessage_NUnit.cs
License : GNU Lesser General Public License v2.1
Project Creator : dvtk-org

[Test]
        public void Ticket1293_2_1()
        {
            ThreadManager threadManager = new ThreadManager();

            Ticket1293MainDicomThread ticket1293MainDicomThread = new Ticket1293MainDicomThread("1.2.840.10008.1.2.1");

            ticket1293MainDicomThread.Initialize(threadManager);

            Config.SetOptions(ticket1293MainDicomThread, "Ticket1293", "Main 1.2.840.10008.1.2.1");

            HliForm hliForm = new HliForm();
            hliForm.Attach(ticket1293MainDicomThread);

            ticket1293MainDicomThread.Start();

            ticket1293MainDicomThread.WaitForCompletion();

            replacedert.That(ticket1293MainDicomThread.NrOfErrors + ticket1293MainDicomThread.NrOfWarnings, Is.EqualTo(0));
        }

19 View Source File : DicomMessage_NUnit.cs
License : GNU Lesser General Public License v2.1
Project Creator : dvtk-org

[Test]
        public void Ticket1293_3_1()
        {
            ThreadManager threadManager = new ThreadManager();

            Ticket1293MainDicomThread ticket1293MainDicomThread = new Ticket1293MainDicomThread("1.2.840.10008.1.2.2");

            ticket1293MainDicomThread.Initialize(threadManager);

            Config.SetOptions(ticket1293MainDicomThread, "Ticket1293", "Main 1.2.840.10008.1.2.2");
            ticket1293MainDicomThread.Options.LoadDefinitionFile(Path.Combine(Paths.DefinitionsDirectoryFullPath, "PatientRootQueryRetrieve-FIND.def"));

            HliForm hliForm = new HliForm();
            hliForm.Attach(ticket1293MainDicomThread);

            ticket1293MainDicomThread.Start();

            ticket1293MainDicomThread.WaitForCompletion();

            replacedert.That(ticket1293MainDicomThread.NrOfErrors + ticket1293MainDicomThread.NrOfWarnings, Is.EqualTo(0));
        }

19 View Source File : DicomMessage_NUnit.cs
License : GNU Lesser General Public License v2.1
Project Creator : dvtk-org

[Test]
        public void Ticket1293_4_1()
        {
            ThreadManager threadManager = new ThreadManager();

            Ticket1293MainDicomThread ticket1293MainDicomThread = new Ticket1293MainDicomThread("1.2.840.10008.5.1.4.1.1.7");

            ticket1293MainDicomThread.Initialize(threadManager);

            Config.SetOptions(ticket1293MainDicomThread, "Ticket1293", "Main 1.2.840.10008.5.1.4.1.1.7");
            ticket1293MainDicomThread.Options.LoadDefinitionFile(Path.Combine(Paths.DefinitionsDirectoryFullPath, "PatientRootQueryRetrieve-FIND.def"));

            HliForm hliForm = new HliForm();
            hliForm.Attach(ticket1293MainDicomThread);

            ticket1293MainDicomThread.Start();

            ticket1293MainDicomThread.WaitForCompletion();

            replacedert.That(ticket1293MainDicomThread.NrOfErrors + ticket1293MainDicomThread.NrOfWarnings, Is.EqualTo(0));
        }

[Test]
        public void ContainsAttribute_1_1()
        {
            replacedert.That(BooleanExpressionDataSet.ContainsAttribute("0x00200020").Evaluate(this.dataSet1), Is.True);
        }

[Test]
        public void ContainsAttribute_2_1()
        {
            replacedert.That(BooleanExpressionDataSet.ContainsAttribute("0x00300030").Evaluate(this.dataSet1), Is.False);
        }

[Test]
        public void Not_1_1()
        {
            replacedert.That((!BooleanExpressionDataSet.ContainsAttribute("0x00200020")).Evaluate(this.dataSet1), Is.False);
        }

[Test]
        public void Not_2_1()
        {
            replacedert.That((!BooleanExpressionDataSet.ContainsAttribute("0x00300030")).Evaluate(this.dataSet1), Is.True);
        }

[Test]
        public void Or_1_1()
        {
            replacedert.That(( (BooleanExpressionDataSet.ContainsAttribute("0x00300030")) | (BooleanExpressionDataSet.ContainsAttribute("0x00500050"))).Evaluate(this.dataSet2), Is.True);
        }

[Test]
        public void Or_2_1()
        {
            replacedert.That(((BooleanExpressionDataSet.ContainsAttribute("0x00500050")) | (BooleanExpressionDataSet.ContainsAttribute("0x00400040"))).Evaluate(this.dataSet2), Is.True);
        }

[Test]
        public void Or_3_1()
        {
            replacedert.That(((BooleanExpressionDataSet.ContainsAttribute("0x00300030")) | (BooleanExpressionDataSet.ContainsAttribute("0x00400040"))).Evaluate(this.dataSet2), Is.True);
        }

[Test]
        public void Or_4_1()
        {
            replacedert.That(((BooleanExpressionDataSet.ContainsAttribute("0x00500050")) | (BooleanExpressionDataSet.ContainsAttribute("0x00600060"))).Evaluate(this.dataSet2), Is.False);
        }

[Test]
        public void OrMultipleLines_1_1()
        {
            BDataSet booleanExpressionDataSet1 = BooleanExpressionDataSet.ContainsAttribute("0x00300030");
            BDataSet booleanExpressionDataSet2 = BooleanExpressionDataSet.ContainsAttribute("0x00500050");

            replacedert.That((booleanExpressionDataSet1 | booleanExpressionDataSet2).Evaluate(this.dataSet2), Is.True);
        }

[Test]
        public void OrMultipleLines_2_1()
        {
            BDataSet booleanExpressionDataSet1 = BooleanExpressionDataSet.ContainsAttribute("0x00500050");
            BDataSet booleanExpressionDataSet2 = BooleanExpressionDataSet.ContainsAttribute("0x00400040");

            replacedert.That((booleanExpressionDataSet1 | booleanExpressionDataSet2).Evaluate(this.dataSet2), Is.True);
        }

[Test]
        public void OrMultipleLines_3_1()
        {
            BDataSet booleanExpressionDataSet1 = BooleanExpressionDataSet.ContainsAttribute("0x00300030");
            BDataSet booleanExpressionDataSet2 = BooleanExpressionDataSet.ContainsAttribute("0x00400040");

            replacedert.That((booleanExpressionDataSet1 | booleanExpressionDataSet2).Evaluate(this.dataSet2), Is.True);
        }

See More Examples