public void GetIndentLevelOfLine_NoIndent() { // Arrange var text = "Hello World."; var service = new DefaultRazorIndentationFactsService(); // Act var indentLevel = service.GetIndentLevelOfLine(text, 4); // Assert Assert.Equal(0, indentLevel); }
public void GetIndentLevelOfLine_AddsTabsAndSpacesOnlyAtBeginningOfLine() { // Arrange var text = " \t \tHello\t World.\t "; var service = new DefaultRazorIndentationFactsService(); // Act var indentLevel = service.GetIndentLevelOfLine(text, 4); // Assert Assert.Equal(11, indentLevel); }