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

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

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

            // Act + Assert
            Assert.IsFalse(span.Equals(null));
        }
Esempio n. 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));
        }
Esempio n. 5
0
        public void Equals_DifferentType_ReturnsFalse()
        {
            // Arrange
            var span = new ModelSpan(SourceLocation.Zero, "A", "A");

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

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

            // Act + Assert
            Assert.IsTrue(span.Equals(span));
        }
Esempio n. 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));
        }