public void It_can_get_and_set_BoundObjectType()
        {
            // Act
            var testObjectTypeDescription = new ObjectTypeDescription { DisplayName = "Test ObjectTypeDescription" };
            _it.BoundObjectType = testObjectTypeDescription;

            // Assert
            Assert.AreEqual(testObjectTypeDescription.DisplayName, _it.BoundObjectType.DisplayName);
        }
示例#2
0
        public void It_has_a_constructor_that_takes_an_IdmResource_without_Creator()
        {
            var resource = new IdmResource
            {
                DisplayName = "My Display Name",
            };
            var it = new ObjectTypeDescription(resource);

            Assert.AreEqual("My Display Name", it.DisplayName);
            Assert.IsNull(it.Creator);
        }
        public void It_has_a_constructor_that_takes_an_IdmResource_without_Creator()
        {
            var resource = new IdmResource
            {
                DisplayName = "My Display Name",
            };
            var it = new ObjectTypeDescription(resource);

            Assert.AreEqual("My Display Name", it.DisplayName);
            Assert.IsNull(it.Creator);
        }
        public void It_can_get_and_set_BoundObjectType()
        {
            // Act
            var testObjectTypeDescription = new ObjectTypeDescription {
                DisplayName = "Test ObjectTypeDescription"
            };

            _it.BoundObjectType = testObjectTypeDescription;

            // Assert
            Assert.AreEqual(testObjectTypeDescription.DisplayName, _it.BoundObjectType.DisplayName);
        }
示例#5
0
        public void It_can_get_and_set_msidmTargetObjectTypeIdentifier()
        {
            // Act
            var testObjectTypeDescription = new ObjectTypeDescription {
                DisplayName = "Test ObjectTypeDescription"
            };

            _it.msidmTargetObjectTypeIdentifier = testObjectTypeDescription;

            // Assert
            Assert.AreEqual(testObjectTypeDescription.DisplayName, _it.msidmTargetObjectTypeIdentifier.DisplayName);
        }
        public void It_has_a_constructor_that_takes_an_IdmResource()
        {
            var resource = new IdmResource
            {
                DisplayName = "My Display Name",
                Creator = new Person { DisplayName = "Creator Display Name", ObjectID = "Creator ObjectID"},
            };
            var it = new ObjectTypeDescription(resource);

            Assert.AreEqual("ObjectTypeDescription", it.ObjectType);
            Assert.AreEqual("My Display Name", it.DisplayName);
            Assert.AreEqual("Creator Display Name", it.Creator.DisplayName);
        }
        public void It_has_BoundObjectType_which_can_be_set_back_to_null()
        {
            // Arrange
            var testObjectTypeDescription = new ObjectTypeDescription {
                DisplayName = "Test ObjectTypeDescription"
            };

            _it.BoundObjectType = testObjectTypeDescription;

            // Act
            _it.BoundObjectType = null;

            // Assert
            Assert.IsNull(_it.BoundObjectType);
        }
示例#8
0
        public void It_has_a_constructor_that_takes_an_IdmResource()
        {
            var resource = new IdmResource
            {
                DisplayName = "My Display Name",
                Creator     = new Person {
                    DisplayName = "Creator Display Name", ObjectID = "Creator ObjectID"
                },
            };
            var it = new ObjectTypeDescription(resource);

            Assert.AreEqual("ObjectTypeDescription", it.ObjectType);
            Assert.AreEqual("My Display Name", it.DisplayName);
            Assert.AreEqual("Creator Display Name", it.Creator.DisplayName);
        }
示例#9
0
        public void It_has_msidmTargetObjectTypeIdentifier_which_can_be_set_back_to_null()
        {
            // Arrange
            var testObjectTypeDescription = new ObjectTypeDescription {
                DisplayName = "Test ObjectTypeDescription"
            };

            _it.msidmTargetObjectTypeIdentifier = testObjectTypeDescription;

            // Act
            _it.msidmTargetObjectTypeIdentifier = null;

            // Assert
            Assert.IsNull(_it.msidmTargetObjectTypeIdentifier);
        }
        public void It_has_BoundObjectType_which_can_be_set_back_to_null()
        {
            // Arrange
            var testObjectTypeDescription = new ObjectTypeDescription { DisplayName = "Test ObjectTypeDescription" };
            _it.BoundObjectType = testObjectTypeDescription;

            // Act
            _it.BoundObjectType = null;

            // Assert
            Assert.IsNull(_it.BoundObjectType);
        }
示例#11
0
 public ObjectTypeDescriptionTests()
 {
     _it = new ObjectTypeDescription();
 }
        public void It_has_msidmTargetObjectTypeIdentifier_which_can_be_set_back_to_null()
        {
            // Arrange
            var testObjectTypeDescription = new ObjectTypeDescription { DisplayName = "Test ObjectTypeDescription" };
            _it.msidmTargetObjectTypeIdentifier = testObjectTypeDescription;

            // Act
            _it.msidmTargetObjectTypeIdentifier = null;

            // Assert
            Assert.IsNull(_it.msidmTargetObjectTypeIdentifier);
        }
        public void It_can_get_and_set_msidmTargetObjectTypeIdentifier()
        {
            // Act
            var testObjectTypeDescription = new ObjectTypeDescription { DisplayName = "Test ObjectTypeDescription" };
            _it.msidmTargetObjectTypeIdentifier = testObjectTypeDescription;

            // Assert
            Assert.AreEqual(testObjectTypeDescription.DisplayName, _it.msidmTargetObjectTypeIdentifier.DisplayName);
        }
 public ObjectTypeDescriptionTests()
 {
     _it = new ObjectTypeDescription();
 }