コード例 #1
0
        public void DicomMapping_TypeWithoutAttributes_CollectionIsEmpty()
        {
            // Arrange
            var objectWithoutAttributes = new ObjectWithoutAttributes();

            // Act
            var dicomMapping = new DicomMapping(objectWithoutAttributes.GetType());

            // Assert
            CollectionAssert.IsEmpty(dicomMapping);
        }
コード例 #2
0
        public void DicomMapping_TypeWithAttributes_CollectionContainsAttributes()
        {
            // Arrange
            var objectWithAttributes = new ObjectWithAttributes();

            // Act
            var dicomMapping = new DicomMapping(objectWithAttributes.GetType());

            // Assert
            CollectionAssert.IsNotEmpty(dicomMapping);

            Assert.That(dicomMapping.Single(c => c.Key.PropertyType == typeof(string)).Value, Is.EqualTo(DicomTags.PatientName));
            Assert.That(dicomMapping.Single(c => c.Key.PropertyType == typeof(int)).Value, Is.EqualTo(DicomTags.PatientID));
        }