Exemplo n.º 1
0
        public void PropertyTypeIsValid()
        {
            // Arrange.
            const string attributeType  = "description";
            const string attributeValue = "Contractor";

            object[] values = { attributeValue };

            // Act.
            LdifAttribute sut = new LdifAttribute(attributeType, values);

            // Assert.
            Assert.Equal(attributeType, sut.AttributeType);
        }
Exemplo n.º 2
0
        public void ShouldBeEnumerable()
        {
            // Arrange.
            const string attributeType   = "description";
            const string attributeValueA = "Contractor";
            const string attributeValueB = "Remote";

            object[] values = { attributeValueA, attributeValueB };

            // Act.
            LdifAttribute sut = new LdifAttribute(attributeType, values);

            // Assert.
            Assert.Equal(values, sut);
        }
Exemplo n.º 3
0
        public void PropertyCountIsValid()
        {
            // Arrange.
            const string attributeType  = "description";
            const string attributeValue = "Contractor";

            object[] values = { attributeValue };

            // Act.
            LdifAttribute sutSingleValue = new LdifAttribute(attributeType, values);
            LdifAttribute sutEmptyValue  = new LdifAttribute(attributeType, null);

            // Assert.
            Assert.Equal(1, sutSingleValue.Count);
            Assert.Equal(0, sutEmptyValue.Count);
        }
Exemplo n.º 4
0
        public void CollectionIndexerIsValid()
        {
            // Arrange.
            const string attributeType   = "description";
            const string attributeValueA = "Contractor";
            const string attributeValueB = "Remote";

            object[] values = { attributeValueA, attributeValueB };

            // Act.
            LdifAttribute sut = new LdifAttribute(attributeType, values);

            // Assert.
            Assert.Equal(attributeValueA, sut[0]);
            Assert.Equal(attributeValueB, sut[1]);
        }