コード例 #1
0
        public void ManyTypedPropertyValuesShouldBeReaded(PropertyValueCollection collection)
        {
            // Fixture setup

            // Exercise system
            collection.SetValues(DirectoryProperty.Member, new object[] { john, paul });

            // Verify outcome
            collection.GetValues <DN>(DirectoryProperty.Member)
            .Should().BeEquivalentTo(john, paul);
        }
コード例 #2
0
        public void ExistingPropertyValuesShouldBeRewritten(PropertyValueCollection collection)
        {
            // Fixture setup
            collection.SetValues(DirectoryProperty.Member, new object[] { john, paul });

            // Exercise system
            collection.SetValues(DirectoryProperty.Member, new object[] { john, paul, ringo });

            // Verify outcome
            collection.GetValues <DN>(DirectoryProperty.Member)
            .Should().BeEquivalentTo(john, paul, ringo);
        }
コード例 #3
0
        public void ManyPropertyValuesShouldBeAppended(PropertyValueCollection collection)
        {
            // Fixture setup
            collection.SetValue(DirectoryProperty.Member, john);

            // Exercise system
            collection.AppendValues(DirectoryProperty.Member, new object[] { paul, ringo });

            // Verify outcome
            collection.GetValues <DN>(DirectoryProperty.Member)
            .Should().BeEquivalentTo(john, paul, ringo);
        }
コード例 #4
0
        public void OnePropertyValueShouldBeAppended(PropertyValueCollection collection)
        {
            // Fixture setup
            collection.SetValue(DirectoryProperty.Member, DN.Parse(john));

            // Exercise system
            collection.AppendValue(DirectoryProperty.Member, DN.Parse(paul));

            // Verify outcome
            collection.GetValues <DN>(DirectoryProperty.Member)
            .Should().BeEquivalentTo(DN.Parse(john), DN.Parse(paul));
        }