public void IsAcceptableInsertionInBalancedParenthesis_ReturnsFalseIfChangeIsParenthesis(string changeText) { // Arrange var change = new SourceChange(0, 1, changeText); // Act var result = ImplicitExpressionEditHandler.IsAcceptableInsertionInBalancedParenthesis(null, change); // Assert Assert.False(result); }
public void IsAcceptableInsertionInBalancedParenthesis_BalancedParenthesis_ReturnsTrue() { // Arrange var span = GetSyntaxNode(SourceLocation.Zero, "(Hello)"); var change = new SourceChange(new SourceSpan(6, 0), " World"); // Act var result = ImplicitExpressionEditHandler.IsAcceptableInsertionInBalancedParenthesis(span, change); // Assert Assert.True(result); }
public void IsAcceptableInsertionInBalancedParenthesis_InsertingParenthesis_ReturnsFalse(string text) { // Arrange var span = GetSyntaxNode(SourceLocation.Zero, "(Hello World)"); var change = new SourceChange(new SourceSpan(3, 0), text); // Act var result = ImplicitExpressionEditHandler.IsAcceptableInsertionInBalancedParenthesis(span, change); // Assert Assert.False(result); }