Пример #1
0
        public void CombineSnippetsBug()
        {
            // Bug found in UAT

            var builder = new SnippetsBuilder("<strong>...</strong> ", " <strong>...</strong>", " <strong>...</strong> ");

            builder.Add(new string('x', 100) +
                        "<strong>...</strong> to prepare <span class=\"highlighted-word\">test</span> strategies,"
                        + " <span class=\"highlighted-word\">test</span> plans including <span class=\"highlightedWord\">test</span> matrixes"
                        + " for <span class=\"highlighted-word\">test</span> coverage, <span class=\"highlightedWord\">test</span> cases"
                        + " <strong>...</strong>");
            builder.Add(
                "<strong>...</strong> background in both <span class=\"highlighted-word\">test</span> planing and execution <strong>...</strong>");
            builder.Add("2008: Snr <span class=\"highlighted-word\">Test</span> Analyst, <strong>...</strong>");

            string combined = builder.ToString();

            Assert.AreEqual("<strong>...</strong> background in both <span class=\"highlighted-word\">test</span> planing and"
                            + " execution <strong>...</strong> 2008: Snr <span class=\"highlighted-word\">Test</span> Analyst, <strong>...</strong>",
                            combined);
            Assert.IsTrue(combined.Length < SnippetsBuilder.MAX_TOTAL_CHARS + 1);
        }
Пример #2
0
 public void TestInitialize()
 {
     _builder = new SnippetsBuilder("... ", " ...", " ... ");
 }