public void CompareUntyped(double value, double valueToCompareWith, int expectedResult) { var valueSize = new ByteSize(value); object otherSize = new ByteSize(valueToCompareWith); var result = valueSize.CompareTo(otherSize); Assert.Equal(expectedResult, result); }
public void CompareTo_ValuesAreEqual() { var leftValue = new ByteSize(1000); var rightValue = new ByteSize(1000); //Act var actual = leftValue.CompareTo(rightValue); //Assert actual.Should().Be(0); }
public void CompareTo_ValueIsLarger() { var leftValue = new ByteSize(1002); var rightValue = new ByteSize(1001); //Act var actual = leftValue.CompareTo(rightValue); //Assert actual.Should().BeGreaterThan(0); }
public void CompareTo_ValueIsSmaller() { var leftValue = new ByteSize(1000); var rightValue = new ByteSize(1001); //Act var actual = leftValue.CompareTo(rightValue); //Assert actual.Should().BeLessThan(0); }
public int CompareTo(FileSize other) { return(ByteSize.CompareTo(other.ByteSize)); }