public void testClear() { TagExtractor extractor = new TagExtractor("abstract", 10); extractor.setTag("abstract"); extractor.add("This is a sample text."); Assert.AreEqual(extractor.buf_.ToString(), "This is a sample text."); Assert.AreEqual(extractor.tag_, "abstract"); extractor.clear(); Assert.AreEqual(extractor.buf_.ToString(), ""); Assert.AreEqual(extractor.tag_, null); }