public void ShouldTriggerOnTotalMisusageWithObjectEquals_Left()
        {
            var hint = new TimeSpanTotalMistakesHint();

            Expression<Func<bool>> x = () => Equals(TimeSpan.FromMinutes(63).Minutes, 63);

            string description;
            Assert.IsTrue(hint.TryGetHint(x.Body, out description));
            Assert.IsNotNull(description);
        }
        public void ShouldTriggerOnTotalMisusageWithEquals_Right()
        {
            var hint = new TimeSpanTotalMistakesHint();

            Expression<Func<bool>> x = () => 63.Equals(TimeSpan.FromMinutes(63).Minutes);
            var p = new ExpressionParser(x.Body);

            string description;
            Assert.IsTrue(hint.TryGetHint(p, x.Body, out description));
            Assert.IsNotNull(description);
        }
        public void DoesntExplodeOnNonTotalMethods()
        {
            var hint = new TimeSpanTotalMistakesHint();

            Expression<Func<bool>> x = () => Equals(TimeSpan.FromMinutes(63).Ticks, 63);

            string description;
            Assert.IsFalse(hint.TryGetHint(x.Body, out description));
            Assert.IsNull(description);
        }
        public void DoesntTriggerIfTheyWouldNotBeEqual()
        {
            var hint = new TimeSpanTotalMistakesHint();

            Expression<Func<bool>> x = () => Equals(TimeSpan.FromMinutes(63).Minutes, 62);

            string description;
            Assert.IsFalse(hint.TryGetHint(x.Body, out description));
            Assert.IsNull(description);
        }