[InlineData(9, 5, " Space")] // "Some Name Space" public void CanAcceptChange_RejectsWhitespaceChanges(int index, int length, string newText) { // Arrange var factory = new SpanFactory(); var directiveTokenHandler = new TestDirectiveTokenEditHandler(); var target = factory.Span(SpanKindInternal.Code, "Some Namespace", markup: false) .With(directiveTokenHandler) .Accepts(AcceptedCharactersInternal.NonWhiteSpace); var sourceChange = new SourceChange(index, length, newText); // Act var result = directiveTokenHandler.CanAcceptChange(target, sourceChange); // Assert Assert.Equal(PartialParseResult.Rejected, result); }
[InlineData(9, 5, " Space")] // "Some Name Space" public void CanAcceptChange_RejectsWhitespaceChanges(int index, int length, string newText) { // Arrange var directiveTokenHandler = new TestDirectiveTokenEditHandler(); directiveTokenHandler.AcceptedCharacters = AcceptedCharactersInternal.NonWhitespace; var target = GetSyntaxNode(directiveTokenHandler, "Some Namespace"); var sourceChange = new SourceChange(index, length, newText); // Act var result = directiveTokenHandler.CanAcceptChange(target, sourceChange); // Assert Assert.Equal(PartialParseResultInternal.Rejected, result); }