Esempio n. 1
0
        public void Equality_ValuesShouldMatch()
        {
            (t3 == t4).Should()
            .BeTrue();
            t3.Equals(t4)
            .Should()
            .BeTrue();
            t2.Equals(t4)
            .Should()
            .BeFalse();
            (t3 != t4).Should()
            .BeFalse();
            (t2 == t4).Should()
            .BeFalse();
            (t2 != t4).Should()
            .BeTrue();
            (t3 >= t4).Should()
            .BeTrue();
            (t2 <= t4).Should()
            .BeTrue();
            (t2 > t4).Should()
            .BeFalse();
            (t2 < t4).Should()
            .BeTrue();
            t.Equals(t5)
            .Should()
            .BeTrue();

            // ReSharper disable once SuspiciousTypeConversion.Global
            t5.Equals(t)
            .Should()
            .BeTrue();
            (t5 == t).Should()
            .BeTrue();
            t5.Should()
            .Be(t);
            t.Should()
            .Be(t5);

            t2 = StatusEnum.Error;
            t2.HasFlag(StatusEnum.Error)
            .Should()
            .BeFalse();
        }