public void ThrowsExceptionWhenNotCollection()
        {
            var validator = new UniqueMembersValidator();

            try
            {
                int i = 10;
                Assert.That(validator.IsValid(i, null), Is.False);
                Assert.Fail();
            }
            catch (SharpArch.Core.PreconditionException)
            {
            }
            catch
            {
                Assert.Fail();
            }
        }
 public void ReturnsTrueWhenMembersAreUnique()
 {
     var validator = new UniqueMembersValidator();
     var collection = PropertyCollectionFactory.InsertSampleData;
     Assert.That(validator.IsValid(collection, null), Is.True);
 }
 public void ReturnsFalseWhenMembersAreNotUnique()
 {
     var validator = new UniqueMembersValidator();
     var collection = PropertyCollectionFactory.ContainsDuplicatePropertyNames;
     Assert.That(validator.IsValid(collection, null), Is.False);
 }