public void TextLineAtSign_ShouldReplaceWithTextTags() { string expectedResult = DataHelpers.WithAtSignTextExpectedResult; string minifiedHtml = StreamReaderExtension.MinifyHtmlCode(DataHelpers.WithAtSignText, noFeatures); Assert.That(minifiedHtml, Is.EqualTo(expectedResult)); }
public void CommentLineWithTripleSlash_ShouldBeRemoved() { string expectedResult = DataHelpers.CommentLineWithTripleSlashExpectedResult; string minifiedHtml = StreamReaderExtension.MinifyHtmlCode(DataHelpers.CommentLineWithTripleSlash, noFeatures); Assert.That(minifiedHtml, Is.EqualTo(expectedResult)); }
public void ModelViewDoubleLessThanSign_ShouldTakenToTop() { string expectedResult = DataHelpers.TupleModelExpectedResult; string minifiedHtml = StreamReaderExtension.MinifyHtmlCode(DataHelpers.TupleModel, noFeatures); Assert.That(minifiedHtml, Is.EqualTo(expectedResult)); }
public void TestCommentsRemove() { string expected = DataHelpers.CommentsRemoveResult; string minifiedHtml = StreamReaderExtension.MinifyHtmlCode(DataHelpers.CommentsRemoveInput, noFeatures); Assert.That(minifiedHtml, Is.EqualTo(expected)); }
public void GithubIssue36_ShouldReturnCorrectly() { // Act string minifiedHtml = StreamReaderExtension.MinifyHtmlCode(DataHelpers.GithubIssue36, noFeatures); // Assert Assert.That(minifiedHtml, Is.EqualTo(DataHelpers.GithubIssue36Result)); }
public void BadHTML_ShouldReturnCorrectly() { string badHtml = "@model ."; // Act string minifiedHtml = StreamReaderExtension.MinifyHtmlCode(badHtml, noFeatures); // Assert Assert.That(badHtml, Is.EqualTo(badHtml)); }
public void RemoveMultipleHtmlComments_WithIncludeVirtuals_ShouldReturnCorrectly() { string expectedResult = DataHelpers.WithIncludeVirtualsResult; // Act string minifiedHtml = StreamReaderExtension.MinifyHtmlCode(DataHelpers.WithIncludeVirtuals, noFeatures); // Assert Assert.That(minifiedHtml, Is.EqualTo(expectedResult)); }
public void GithubIssue13_ShouldReturnCorrectly() { // A fix for a Github issue - https://github.com/deanhume/html-minifier/issues/13 string expectedResult = DataHelpers.GithubIssue13Result; // Act string minifiedHtml = StreamReaderExtension.MinifyHtmlCode(DataHelpers.GithubIssue13, noFeatures); // Assert Assert.That(minifiedHtml, Is.EqualTo(expectedResult)); }
public void MinifyContents_WithLanguageSpecficCharacters_ShouldReturnCorrectly() { // Arrange string expectedResult = DataHelpers.LanguageSpecificCharactersResult; // Act string minifiedHtml = StreamReaderExtension.MinifyHtmlCode(DataHelpers.LanguageSpecificCharacters, noFeatures); // Assert Assert.That(minifiedHtml, Is.EqualTo(expectedResult)); }
public void MinifyContents_WithModelList_ShouldReturnCorrectly() { // Arrange string expectedResult = DataHelpers.ModelListResult; // Act string minifiedHtml = StreamReaderExtension.MinifyHtmlCode(DataHelpers.ModelList, noFeatures); // Assert Assert.That(minifiedHtml, Is.EqualTo(expectedResult)); }
public void ReadHtml_WithStandardText_ShouldReturnCorrectly() { // Arrange string expectedResult = DataHelpers.StandardResult; // Act string minifiedHtml = StreamReaderExtension.MinifyHtmlCode(DataHelpers.Standard, noFeatures); // Assert Assert.That(minifiedHtml, Is.EqualTo(expectedResult)); }
public void GithubIssue19Multiple_ShouldReturnCorrectly() { // A fix for a Github issue - https://github.com/deanhume/html-minifier/issues/19 string expectedResult = DataHelpers.GithubIssue19MultipleResult; // Act string minifiedHtml = StreamReaderExtension.MinifyHtmlCode(DataHelpers.GithubIssue19Multiple, noFeatures); // Assert Assert.AreEqual(minifiedHtml, expectedResult); }
public void ReadHtRazor_WithOnlyDeclaration_ShouldReturnCorrectly() { // Arrange string expectedResult = DataHelpers.OnlyDeclarationResult; // Act string minifiedHtml = StreamReaderExtension.MinifyHtmlCode(DataHelpers.OnlyDeclaration, noFeatures); // Assert Assert.That(minifiedHtml, Is.EqualTo(expectedResult)); }
public void GithubIssue44_ShouldReturnCorrectly() { // Arrange string expectedResult = DataHelpers.GithubIssue44Result; // Act string minifiedHtml = StreamReaderExtension.MinifyHtmlCode(DataHelpers.GithubIssue44, noFeatures); // Assert Assert.AreEqual(minifiedHtml, expectedResult); }
public void MinifyContents_WithComments_ShouldReturnCorrectly() { // Arrange string expectedResult = DataHelpers.CommentsResult; // Act string minifiedHtml = StreamReaderExtension.MinifyHtmlCode(DataHelpers.Comments, noFeatures); // Assert Assert.AreEqual(minifiedHtml, expectedResult); }
public void SixtyFiveKCharacters_ShouldBreakToNextLine() { // A fix for a Github issue - https://github.com/deanhume/html-minifier/issues/14 List <string> args = new List <string> { "pathToFiles", "60000" }; string expectedResult = DataHelpers.SixtyFiveThousandCharactersResult; // Act string minifiedHtml = StreamReaderExtension.MinifyHtmlCode(DataHelpers.SixtyFiveThousandCharacters, new Features(args.ToArray())); // Assert Assert.That(minifiedHtml, Is.EqualTo(expectedResult)); }
public void SixtyFiveKCharacters_WithoutArgs_ShouldMakeNoChange() { // A fix for a Github issue - https://github.com/deanhume/html-minifier/issues/14 List <string> args = new List <string> { "pathToFiles" }; string expectedResult = DataHelpers.SixtyFiveThousandCharactersNoBreakResult; // Act string minifiedHtml = StreamReaderExtension.MinifyHtmlCode(DataHelpers.SixtyFiveThousandCharacters, new Features(args.ToArray())); // Assert Assert.AreEqual(minifiedHtml, expectedResult); }
public void GithubIssue23_ShouldReturnCorrectly() { // A fix for a Github issue - https://github.com/deanhume/html-minifier/issues/23 string expectedResult = DataHelpers.GithubIssue23Result; // test IgnoreHtmlComments List <string> args = new List <string> { "ignorehtmlcomments" }; // Act string minifiedHtml = StreamReaderExtension.MinifyHtmlCode(DataHelpers.GithubIssue23, new Features(args.ToArray())); // Assert Assert.That(minifiedHtml, Is.EqualTo(expectedResult)); }