예제 #1
0
        public void It_has_a_constructor_that_takes_an_IdmResource_without_Creator()
        {
            var resource = new IdmResource
            {
                DisplayName = "My Display Name",
            };
            var it = new ma_data(resource);

            Assert.AreEqual("My Display Name", it.DisplayName);
            Assert.IsNull(it.Creator);
        }
예제 #2
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 ma_data(resource);

            Assert.AreEqual("ma-data", it.ObjectType);
            Assert.AreEqual("My Display Name", it.DisplayName);
            Assert.AreEqual("Creator Display Name", it.Creator.DisplayName);
        }
        public void It_has_ManagementAgentID_which_can_be_set_back_to_null()
        {
            // Arrange
            var testma_data = new ma_data { DisplayName = "Test ma_data" };
            _it.ManagementAgentID = testma_data;

            // Act
            _it.ManagementAgentID = null;

            // Assert
            Assert.IsNull(_it.ManagementAgentID);
        }
예제 #4
0
 public ma_dataTests()
 {
     _it = new ma_data();
 }
        public void It_can_get_and_set_ManagementAgentID()
        {
            // Act
            var testma_data = new ma_data { DisplayName = "Test ma_data" };
            _it.ManagementAgentID = testma_data;

            // Assert
            Assert.AreEqual(testma_data.DisplayName, _it.ManagementAgentID.DisplayName);
        }