예제 #1
0
        public void IsAcceptableDeletion_NotDelete_ReturnsFalse()
        {
            // Arrange
            var span   = GetSpan(SourceLocation.Zero, "world");
            var change = new SourceChange(new SourceSpan(0, 0), "hello");

            // Act
            var result = CodeBlockEditHandler.IsAcceptableDeletion(span, change);

            // Assert
            Assert.False(result);
        }
예제 #2
0
        public void IsAcceptableDeletion_InvalidChange_ReturnsFalse()
        {
            // Arrange
            var span   = GetSpan(SourceLocation.Zero, "Hello {world}.");
            var change = new SourceChange(new SourceSpan(5, 3), string.Empty);

            // Act
            var result = CodeBlockEditHandler.IsAcceptableDeletion(span, change);

            // Assert
            Assert.False(result);
        }