Example #1
0
        public void GetDynamicMemberNames_ThreeDynamicPropertiesSet_ReturnsSetOfDynamicPropertyNames()
        {
            dynamic changeSet = new ChangeSet<TestObject>();

            changeSet.HelloWorld = 0;
            changeSet.OhMyGoggles = "Hello, World.";
            changeSet.Count = Guid.NewGuid();

            var dynamicMemberNames = changeSet.GetDynamicMemberNames();

            Assert.That(dynamicMemberNames, Is.Not.Empty);
            Assert.That(dynamicMemberNames, Has.Count.EqualTo(3));
            Assert.That(dynamicMemberNames, Contains.Item("HelloWorld"));
            Assert.That(dynamicMemberNames, Contains.Item("HelloWorld"));
            Assert.That(dynamicMemberNames, Contains.Item("HelloWorld"));
        }
Example #2
0
        public void GetDynamicMemberNames_NoDynamicPropertiesSet_ReturnsEmptySet()
        {
            var changeSet = new ChangeSet<TestObject>();

            Assert.That(changeSet.GetDynamicMemberNames(), Is.Empty);
        }