Example #1
0
        public void IsEqual_OneNull_ReturnsFalse()
        {
            //prepare
            _mappingArguments.Getter = t => null;
            var propertyMapping = new ByteArrayCollectionPropertyMapping <ByteArrayCollectionPropertyMappingTest>(_mappingArguments);
            DirectoryAttributeModification modification;
            //act
            var value = propertyMapping.IsEqual(this, new[] { new byte[] { 1, 2, 3 }, new byte[] { 4, 5, 7 } }, out modification);

            //assert
            value.Should().Be.False();
            modification.Should().Not.Be.Null();
        }
Example #2
0
        public void IsEqual_SameLengthDifferentCollections_ReturnsFalse()
        {
            //prepare
            _mappingArguments.Getter = t => new Collection <byte[]>(new List <byte[]> {
                new byte[] { 1, 2, 3 }, new byte[] { 4, 5, 6 }
            });
            var propertyMapping = new ByteArrayCollectionPropertyMapping <ByteArrayCollectionPropertyMappingTest>(_mappingArguments);
            DirectoryAttributeModification modification;
            //act
            var value = propertyMapping.IsEqual(this, new Collection <byte[]>(new List <byte[]> {
                new byte[] { 1, 2, 3 }, new byte[] { 4, 5, 7 }
            }), out modification);

            //assert
            value.Should().Be.False();
            modification.Should().Not.Be.Null();
        }