package org.opengroupware.jope.appserver.tests;

import static org.junit.Assert.*;

import org.junit.Test;
import org.opengroupware.jope.appserver.WOElement;

public class WOGenericElementTest extends WOElementTest {

  static String elemName = 
    "org.opengroupware.jope.appserver.elements.WOGenericElement";
  static String containerName = 
    "org.opengroupware.jope.appserver.elements.WOGenericContainer";
  
  static String hrRendering   = "<hr border=\"1\" />";
  static String fontRendering = "<font color=\"green\" />";
  
  @Test public void testSimpleHrTag() {
    WOElement s = this.createElement(elemName, new Object[] {
        "elementName", "hr",
        "border",      "1"
    });
    assertNotNull(s);
    assertEquals(hrRendering, this.generateElement(s));
  }

  @Test public void testSimpleFontTag() {
    WOElement s = this.createElement(containerName, new Object[] {
        "elementName", "font",
        "color",       "green"
    });
    assertNotNull(s);
    assertEquals(fontRendering, this.generateElement(s));
  }
}
