TestXhtmlContentLoader.java :  » Web-Framework » rife-1.6.1 » com » uwyn » rife » cmf » loader » Java Open Source

Java Open Source » Web Framework » rife 1.6.1 
rife 1.6.1 » com » uwyn » rife » cmf » loader » TestXhtmlContentLoader.java
/*
 * Copyright 2001-2007 Geert Bevin <gbevin[remove] at uwyn dot com>
 * Distributed under the terms of either:
 * - the common development and distribution license (CDDL), v1.0; or
 * - the GNU Lesser General Public License, v2.1 or later
 * $Id: TestXhtmlContentLoader.java 3634 2007-01-08 21:42:24Z gbevin $
 */
package com.uwyn.rife.cmf.loader;

import java.util.HashSet;
import java.util.Set;
import junit.framework.TestCase;

public class TestXhtmlContentLoader extends TestCase
{
  public TestXhtmlContentLoader(String name)
  {
    super(name);
  }

  public void testLoad()
  throws Exception
  {
      XhtmlContentLoader loader = new XhtmlContentLoader();
    Set<String> errors = new HashSet<String>();

    String xhtml = loader.load("<p>some <b>html</b> here</p>", true, errors);

    assertNotNull(xhtml);
    assertEquals(0, errors.size());
  }

  public void testLoadNull()
  throws Exception
  {
      XhtmlContentLoader loader = new XhtmlContentLoader();
    Set<String> errors = new HashSet<String>();

    String xhtml = loader.load(null, false, errors);

    assertNull(xhtml);
    assertEquals(0, errors.size());
  }

  public void getBackends()
  throws Exception
  {
      XhtmlContentLoader loader = new XhtmlContentLoader();
    assertTrue(loader.getBackends().size() > 0);
  }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.