public override string ToString() { if (string.IsNullOrEmpty(_compressedHtml)) { var html = base.ToString(); var compressor = new SimpleHtmlCompressor(); _compressedHtml = compressor.Compress(html); } return(_compressedHtml); }
public override string ToString() { if (string.IsNullOrEmpty(_compressedHtml)) { var html = base.ToString(); var compressor = new SimpleHtmlCompressor(); _compressedHtml = compressor.Compress(html); } return _compressedHtml; }
[TestMethod] public void TestRemoveComment_Multispaces_CompressJs() { SimpleHtmlCompressor compressor = new SimpleHtmlCompressor() { IsCompressJs = true }; Stopwatch stopwatch = new Stopwatch(); stopwatch.Start(); var actual = compressor.Compress(html); stopwatch.Stop(); Console.WriteLine(stopwatch.ElapsedMilliseconds);
[TestMethod] public void TestRemoveComment_Multispaces() { SimpleHtmlCompressor compressor = new SimpleHtmlCompressor(); Stopwatch stopwatch = new Stopwatch(); stopwatch.Start(); var actual = compressor.Compress(html); stopwatch.Stop(); Console.WriteLine(stopwatch.ElapsedMilliseconds); Console.WriteLine(actual); //Assert.AreEqual(expected, actual);