예제 #1
0
        public void Equals_DifferentType_ReturnsFalse() {
            // Arrange
            var span = new ModelSpan(SourceLocation.Zero, "A", "A");

            // Act + Assert
            Assert.IsFalse(span.Equals(new object()));
        }
예제 #2
0
        public void Equals_SameInstance_ReturnsTrue() {
            // Arrange
            var span = new ModelSpan(SourceLocation.Zero, " TypeName   ", "TypeName");

            // Act + Assert
            Assert.IsTrue(span.Equals(span));
        }
예제 #3
0
        public void Equals_NullValue_ReturnsFalse() {
            // Arrange
            var span = new ModelSpan(SourceLocation.Zero, "A", "A");

            // Act + Assert
            Assert.IsFalse(span.Equals(null));
        }
예제 #4
0
        public void Equals_IdenticalSpan_ReturnsTrue() {
            // Arrange
            var span1 = new ModelSpan(SourceLocation.Zero, " TypeName   ", "TypeName");
            var span2 = new ModelSpan(SourceLocation.Zero, " TypeName   ", "TypeName");

            // Act + Assert
            Assert.IsTrue(span1.Equals(span2));
        }
예제 #5
0
        public void Equals_DifferentType_ReturnsFalse()
        {
            // Arrange
            var span = new ModelSpan(SourceLocation.Zero, "A", "A");

            // Act + Assert
            Assert.IsFalse(span.Equals(new object()));
        }
예제 #6
0
        public void Equals_NullValue_ReturnsFalse()
        {
            // Arrange
            var span = new ModelSpan(SourceLocation.Zero, "A", "A");

            // Act + Assert
            Assert.IsFalse(span.Equals(null));
        }
예제 #7
0
        public void Equals_SameInstance_ReturnsTrue()
        {
            // Arrange
            var span = new ModelSpan(SourceLocation.Zero, " TypeName   ", "TypeName");

            // Act + Assert
            Assert.IsTrue(span.Equals(span));
        }
예제 #8
0
        public void Equals_IdenticalSpan_ReturnsTrue()
        {
            // Arrange
            var span1 = new ModelSpan(SourceLocation.Zero, " TypeName   ", "TypeName");
            var span2 = new ModelSpan(SourceLocation.Zero, " TypeName   ", "TypeName");

            // Act + Assert
            Assert.IsTrue(span1.Equals(span2));
        }