/light_logs/light_logs/test/OctaneProjectsTest/src/com/octane/util/xml/WSGarbageCollectionLogBuilderTest.java
http://lighttexteditor.googlecode.com/ · Java · 144 lines · 63 code · 9 blank · 72 comment · 6 complexity · 696c53b22bcb76d5275f6163ad02308d MD5 · raw file
- package com.octane.util.xml;
- import java.util.regex.Matcher;
- import junit.framework.*;
- /**
- * The class <code>WSGarbageCollectionLogBuilderTest</code> contains tests for the class <code>{@link WSGarbageCollectionLogBuilder}</code>.
- *
- * @generatedBy CodePro at 6/25/09 10:16 AM
- * @author Berlin
- * @version $Revision: 1.0 $
- */
- public class WSGarbageCollectionLogBuilderTest extends TestCase {
- /**
- * An instance of the class being tested.
- *
- * @see WSGarbageCollectionLogBuilder
- *
- * @generatedBy CodePro at 6/25/09 10:16 AM
- */
- private WSGarbageCollectionLogBuilder fixture;
- /**
- * Return an instance of the class being tested.
- *
- * @return an instance of the class being tested
- *
- * @see WSGarbageCollectionLogBuilder
- *
- * @generatedBy CodePro at 6/25/09 10:16 AM
- */
- public WSGarbageCollectionLogBuilder getFixture()
- throws Exception {
- if (fixture == null) {
- fixture = new WSGarbageCollectionLogBuilder("1");
- }
- return fixture;
- }
- /**
- * Run the WSGarbageCollectionLogBuilder(String) constructor test.
- *
- * @generatedBy CodePro at 6/25/09 10:16 AM
- */
- public void testWSGarbageCollectionLogBuilder_1()
- throws Exception {
- String indoc = "1";
- WSGarbageCollectionLogBuilder result = new WSGarbageCollectionLogBuilder(indoc);
- // add additional test code here
- assertNotNull(result);
- }
- /**
- * Run the WSGarbageCollectionLogBuilder(String) constructor test.
- *
- * @generatedBy CodePro at 6/25/09 10:16 AM
- */
- public void testWSGarbageCollectionLogBuilder_2()
- throws Exception {
- String indoc = null;
- WSGarbageCollectionLogBuilder result = new WSGarbageCollectionLogBuilder(indoc);
- // add additional test code here
- assertNotNull(result);
- }
- /**
- * Run the Matcher matchHeader() method test.
- *
- * @generatedBy CodePro at 6/25/09 10:16 AM
- */
- public void testMatchHeader_fixture_1()
- throws Exception {
- WSGarbageCollectionLogBuilder fixture2 = getFixture();
- Matcher result = fixture2.matchHeader();
- // add additional test code here
- assertNotNull(result);
- assertEquals(false, result.find());
- assertEquals(1, result.groupCount());
- assertEquals(true, result.hasAnchoringBounds());
- assertEquals(false, result.hasTransparentBounds());
- assertEquals(false, result.hitEnd());
- assertEquals(false, result.lookingAt());
- assertEquals(false, result.matches());
- assertEquals(1, result.regionEnd());
- assertEquals(0, result.regionStart());
- assertEquals(false, result.requireEnd());
- assertEquals("java.util.regex.Matcher[pattern=<\\?xml version(.*?)\\?> region=0,1 lastmatch=]", result.toString());
- }
- /**
- * Perform pre-test initialization.
- *
- * @throws Exception
- * if the initialization fails for some reason
- *
- * @see TestCase#setUp()
- *
- * @generatedBy CodePro at 6/25/09 10:16 AM
- */
- protected void setUp()
- throws Exception {
- super.setUp();
- // add additional set up code here
- }
- /**
- * Perform post-test clean-up.
- *
- * @throws Exception
- * if the clean-up fails for some reason
- *
- * @see TestCase#tearDown()
- *
- * @generatedBy CodePro at 6/25/09 10:16 AM
- */
- protected void tearDown()
- throws Exception {
- super.tearDown();
- // Add additional tear down code here
- }
- /**
- * Launch the test.
- *
- * @param args the command line arguments
- *
- * @generatedBy CodePro at 6/25/09 10:16 AM
- */
- public static void main(String[] args) {
- if (args.length == 0) {
- // Run all of the tests
- junit.textui.TestRunner.run(WSGarbageCollectionLogBuilderTest.class);
- } else {
- // Run only the named tests
- TestSuite suite = new TestSuite("Selected tests");
- for (int i = 0; i < args.length; i++) {
- TestCase test = new WSGarbageCollectionLogBuilderTest();
- test.setName(args[i]);
- suite.addTest(test);
- }
- junit.textui.TestRunner.run(suite);
- }
- }
- }