Esempio n. 1
0
        public void GeneratedCodeMappingsAreEqualIfDataIsEqual()
        {
            // Arrange
            var left = new LineMapping(
                new MappingLocation(new SourceLocation(1, 2, 3), 4),
                new MappingLocation(new SourceLocation(5, 6, 7), 8)
            );
            var right = new LineMapping(
                new MappingLocation(new SourceLocation(1, 2, 3), 4),
                new MappingLocation(new SourceLocation(5, 6, 7), 8)
            );

            // Assert
            Assert.True(left == right);
            Assert.True(left.Equals(right));
            Assert.True(right.Equals(left));
            Assert.True(Equals(left, right));
        }
Esempio n. 2
0
 private void AssertNotEqual(LineMapping left, LineMapping right)
 {
     Assert.False(left == right);
     Assert.False(left.Equals(right));
     Assert.False(right.Equals(left));
     Assert.False(Equals(left, right));
 }