public void It_should_Be_Greater_Than_False_When_True() { var target = new InterlockedBoolean(true); target.GetValue().Should().BeTrue(); target.Should().Be(new InterlockedBoolean(true)); (target >= false).Should().BeTrue(); (false <= target).Should().BeTrue(); (target >= new InterlockedBoolean(false)).Should().BeTrue(); (new InterlockedBoolean(false) <= target).Should().BeTrue(); (target > false).Should().BeTrue(); (false < target).Should().BeTrue(); (target > new InterlockedBoolean(false)).Should().BeTrue(); (new InterlockedBoolean(false) < target).Should().BeTrue(); (target == true).Should().BeTrue(); (true == target).Should().BeTrue(); (target == new InterlockedBoolean(true)).Should().BeTrue(); (new InterlockedBoolean(true) == target).Should().BeTrue(); (target != false).Should().BeTrue(); (false != target).Should().BeTrue(); (target != new InterlockedBoolean(false)).Should().BeTrue(); (new InterlockedBoolean(false) != target).Should().BeTrue(); (target <= false).Should().BeFalse(); (false >= target).Should().BeFalse(); (target <= new InterlockedBoolean(false)).Should().BeFalse(); (new InterlockedBoolean(false) >= target).Should().BeFalse(); (target < false).Should().BeFalse(); (false > target).Should().BeFalse(); (target < new InterlockedBoolean(false)).Should().BeFalse(); (new InterlockedBoolean(false) > target).Should().BeFalse(); target.As <IComparable <bool> >().Should().BeGreaterThan(false); target.As <IComparable <InterlockedBoolean> >().Should().BeGreaterThan(new InterlockedBoolean(false)); target.CompareTo(false).Should().BeGreaterThan(0); }
public void It_should_Be_Less_Than_True_When_False() { var target = new InterlockedBoolean(false); target.GetValue().Should().BeFalse(); target.Should().Be(new InterlockedBoolean(false)); target.As <IComparable <bool> >().Should().BeLessThan(true); target.As <IComparable <InterlockedBoolean> >().Should().BeLessThan(new InterlockedBoolean(true)); target.As <IComparable>().CompareTo(true).Should().BeLessThan(0); }