public void ReturnsEmptyIfNoChunk() { string noChunk = "<p>adfadfadfadfasdfasdf chunk asdfasdfadsfasdfasdf</p>"; string empty = MTangle.GetChunk(noChunk, "chunk"); Assert.IsEmpty(empty); }
public void ResolvesGetChunkAsChunkWhenNoGetChunk() { string enchunked = "<p>OK, here's my first chunk, which is the \"chunk\" section</p>" + "<pre id=\"chunk\">" + "chunk" + "</pre>"; string same = MTangle.ResolveGetChunks(enchunked, MTangle.GetChunk(enchunked, "chunk")); Assert.AreEqual("chunk", same); }
public void FindsChunk() { string enchunked = "<p>OK, here's my first chunk, which is the \"chunk\" section</p>" + "<pre id=\"chunk\">" + "chunk" + "</pre>"; string chunk = MTangle.GetChunk(enchunked, "chunk"); Assert.AreEqual("chunk", chunk); }
public void ResolvesGetChunks() { string enchunked = "<p>OK, here's my first chunk, which is the \"chunk\" section</p>" + "<pre id=\"chunk\">" + "chunk" + "</pre> " + "<p>And here's my second chunk, which has a getchunk of the first chunk</p>\n" + "<pre id=\"second\">" + "pre" + "<getchunk id=\"chunk\"/>" + "post" + "\n</pre>"; string got = MTangle.ResolveGetChunks(enchunked, MTangle.GetChunk(enchunked, "second")); Assert.AreEqual("prechunkpost\n", got); }