Exemplo n.º 1
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));
        }
Exemplo n.º 2
0
        public void ObjectWithAttributesTest()
        {
            ObjectWithAttributes objectWithAttributes = new ObjectWithAttributes("Brandon", 42, new DateTime(1995, 04, 16), Day.Tue);

            NewtonsoftInteropTests.VerifyNewtonsoftInterop <ObjectWithAttributes>(objectWithAttributes);
        }