public void CompareTo_SameLineAndColumn_Equal() { // Arrange var x = new SourcePosition(1, 6); var y = new SourcePosition(1, 6); // Act var result = x.CompareTo(y); // Assert Assert.AreEqual(0, result); }
public void CompareTo_SameLineSmallerColumn_ReturnSmaller() { // Arrange var x = new SourcePosition(1, 4); var y = new SourcePosition(1, 8); // Act var result = x.CompareTo(y); // Assert Assert.IsTrue(result < 0); }
public void CompareTo_SmallerZeroBasedLineNumber_ReturnSmaller() { // Arrange var x = new SourcePosition(1, 4); var y = new SourcePosition(3, 8); // Act var result = x.CompareTo(y); // Assert Assert.IsTrue(result < 0); }
public void CompareTo_SameLineSmallerColumn_ReturnSmaller() { // Arrange SourcePosition x = new SourcePosition( zeroBasedLineNumber: 1, zeroBasedColumnNumber: 4); SourcePosition y = new SourcePosition( zeroBasedLineNumber: 1, zeroBasedColumnNumber: 8); // Act int result = x.CompareTo(y); // Assert Assert.True(result < 0); }
public void CompareTo_SameLineAndColumn_Equal() { // Arrange SourcePosition x = new SourcePosition( zeroBasedLineNumber: 1, zeroBasedColumnNumber: 6); SourcePosition y = new SourcePosition( zeroBasedLineNumber: 1, zeroBasedColumnNumber: 6); // Act int result = x.CompareTo(y); // Assert Assert.Equal(0, result); }
public void CompareTo_LargerZeroBasedLineNumber_ReturnLarger() { // Arrange SourcePosition x = new SourcePosition( zeroBasedLineNumber: 2, zeroBasedColumnNumber: 4); SourcePosition y = new SourcePosition( zeroBasedLineNumber: 1, zeroBasedColumnNumber: 8); // Act int result = x.CompareTo(y); // Assert Assert.True(result > 0); }
public void CompareTo_SameLineSmallerColumn_ReturnSmaller() { // Arrange SourcePosition x = new SourcePosition { ZeroBasedLineNumber = 1, ZeroBasedColumnNumber = 4 }; SourcePosition y = new SourcePosition { ZeroBasedLineNumber = 1, ZeroBasedColumnNumber = 8 }; // Act int result = x.CompareTo(y); // Assert Assert.IsTrue(result < 0); }
public void CompareTo_SameLineAndColumn_Equal() { // Arrange SourcePosition x = new SourcePosition { ZeroBasedLineNumber = 1, ZeroBasedColumnNumber = 6 }; SourcePosition y = new SourcePosition { ZeroBasedLineNumber = 1, ZeroBasedColumnNumber = 6 }; // Act int result = x.CompareTo(y); // Assert Assert.AreEqual(0, result); }
public void CompareTo_LargerZeroBasedLineNumber_ReturnLarger() { // Arrange SourcePosition x = new SourcePosition { ZeroBasedLineNumber = 2, ZeroBasedColumnNumber = 4 }; SourcePosition y = new SourcePosition { ZeroBasedLineNumber = 1, ZeroBasedColumnNumber = 8 }; // Act int result = x.CompareTo(y); // Assert Assert.IsTrue(result > 0); }