public void ValidateDoesNotThrowWhenComparedObjectsAreEqual()
        {
            object otherObject = new CompareObject("test");
            CompareObject currentObject = new CompareObject("test");
            ValidationContext testContext = new ValidationContext(otherObject, null, null);

            EqualToAttribute attr = new EqualToAttribute("CompareProperty");
            attr.Validate(currentObject.CompareProperty, testContext);
        }
        public void ValidateThrowsWhenComparedObjectsAreNotEqual()
        {
            CompareObject currentObject = new CompareObject("a");
            object otherObject = new CompareObject("b");

            ValidationContext testContext = new ValidationContext(otherObject, null, null);
            testContext.DisplayName = "CurrentProperty";

            EqualToAttribute attr = new EqualToAttribute("CompareProperty");

            attr.Validate(currentObject.CompareProperty, testContext);
        }