public void TryOpenBlock_ReturnsBlockStateNoneIfLineDoesNotBeginWithExpectedCharacters(string line) { // Arrange BlockProcessor dummyBlockProcessor = MarkdigTypesFactory.CreateBlockProcessor(); dummyBlockProcessor.Line = new StringSlice(line); ExposedJsonBlockParser testSubject = CreateExposedJsonBlockParser(); // Act BlockState result = testSubject.ExposedTryOpenBlock(dummyBlockProcessor); // Assert Assert.Equal(BlockState.None, result); }
public void TryOpenBlock_ReturnsBlockStateNoneIfInCodeIndent() { // Arrange BlockProcessor dummyBlockProcessor = MarkdigTypesFactory.CreateBlockProcessor(); // These three lines set IsCodeIndent to true dummyBlockProcessor.Column = 0; dummyBlockProcessor.RestartIndent(); dummyBlockProcessor.Column = 4; ExposedJsonBlockParser testSubject = CreateExposedJsonBlockParser(); // Act BlockState result = testSubject.ExposedTryOpenBlock(dummyBlockProcessor); // Assert Assert.True(dummyBlockProcessor.IsCodeIndent); Assert.Equal(BlockState.None, result); }