incubator-adffaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mat...@apache.org
Subject svn commit: r421025 [1/3] - in /incubator/adffaces/branches/matzew-mock-overhaul/adf-faces: ./ adf-faces-api/ adf-faces-api/src/test/java/org/apache/myfaces/adf/component/ adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/ adf-faces-api...
Date Tue, 11 Jul 2006 23:29:18 GMT
Author: matzew
Date: Tue Jul 11 16:29:16 2006
New Revision: 421025

URL: http://svn.apache.org/viewvc?rev=421025&view=rev
Log:
ADFFACES-4 removing jsf-mock.jar dependency

Added:
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adfbuild/test/AbstractBaseTestCase.java   (with props)
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adfbuild/test/MockRenderKitWrapper.java   (with props)
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adfbuild/test/MockUIComponentWrapper.java   (with props)
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-impl/src/test/java/org/apache/myfaces/adfinternal/renderkit/MFacesContext.java   (with props)
Removed:
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adfbuild/test/MockFContext.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adfbuild/test/MockUtils.java
Modified:
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/pom.xml
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/UIComponentTestCase.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/UIXInputTest.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/UIXProcessTest.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/UIXSelectManyTest.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/UIXShowDetailTest.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/UIXSwitcherTest.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/UIXTableTest.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/UIXTreeTest.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/CoreFormTest.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/data/CoreColumnTest.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/data/CoreSelectRangeChoiceBarTest.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/input/CoreInputHiddenTest.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/input/CoreSelectBooleanCheckboxTest.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CorePanelBorderTest.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CorePanelBoxTest.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CorePanelGroupTest.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CorePanelHeaderTest.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CorePanelListTest.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CorePanelSideBarTest.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CoreShowDetailHeaderTest.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CoreShowDetailTest.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CoreShowManyAccordionTest.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CoreShowOneAccordionTest.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CoreShowOneChoiceTest.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CoreShowOneRadioTest.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/nav/CoreMenuChoiceTest.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/nav/CoreNavigationPathTest.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/nav/CoreProcessTrainTest.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/output/CoreObjectSeparatorTest.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/output/CoreObjectSpacerTest.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/output/CoreOutputTextTest.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/html/HtmlCellFormatTest.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/html/HtmlFrameBorderLayoutTest.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/html/HtmlFrameTest.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/html/HtmlHtmlTest.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/html/HtmlRowLayoutTest.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/html/HtmlScriptTest.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/html/HtmlTableLayoutTest.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/convert/AdfDateTimeConverterTest.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/convert/AdfNumberConverterTest.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/convert/ColorConverterTest.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/convert/ConverterTestCase.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/convert/DateTimeConverterTestCase.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/convert/JsfDateTimeConverterTest.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/convert/JsfNumberConverterTest.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/convert/NumberConverterTestCase.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/util/Base64InputStreamTest.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/util/Base64OutputStreamTest.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/validator/ByteLengthValidatorTest.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/validator/DateTimeRangeValidatorTest.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/validator/RegExpValidatorTest.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/validator/ValidatorTestCase.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adfbuild/test/FacesTestCase.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-impl/pom.xml
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-impl/src/test/java/org/apache/myfaces/adfinternal/application/ViewHandlerImplTest.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-impl/src/test/java/org/apache/myfaces/adfinternal/metadata/RegionMetadataTest.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-impl/src/test/java/org/apache/myfaces/adfinternal/renderkit/BasicHtmlRenderKit.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-impl/src/test/java/org/apache/myfaces/adfinternal/renderkit/core/xhtml/table/TableSelectOneRendererTest.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-impl/src/test/java/org/apache/myfaces/adfinternal/uinode/nav/GoButtonFacesBeanTest.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-impl/src/test/java/org/apache/myfaces/adfinternal/validator/ByteLengthValidatorTest.java
    incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/pom.xml

Modified: incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/pom.xml
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/pom.xml?rev=421025&r1=421024&r2=421025&view=diff
==============================================================================
--- incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/pom.xml (original)
+++ incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/pom.xml Tue Jul 11 16:29:16 2006
@@ -144,12 +144,6 @@
     </dependency>
 
     <dependency>
-      <groupId>javax.faces</groupId>
-      <artifactId>jsf-mock</artifactId>
-      <scope>test</scope>
-    </dependency>
-
-    <dependency>
       <groupId>org.apache.shale</groupId>
       <artifactId>shale-test</artifactId>
       <scope>test</scope>

Modified: incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/UIComponentTestCase.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/UIComponentTestCase.java?rev=421025&r1=421024&r2=421025&view=diff
==============================================================================
--- incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/UIComponentTestCase.java (original)
+++ incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/UIComponentTestCase.java Tue Jul 11 16:29:16 2006
@@ -23,29 +23,30 @@
 
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
-import java.util.Locale;
 import java.util.Map;
-import javax.faces.application.MockViewHandler;
+import javax.faces.application.ViewHandler;
 import javax.faces.component.EditableValueHolder;
 import javax.faces.component.UIComponent;
 import javax.faces.component.UIViewRoot;
 import javax.faces.component.ValueHolder;
 import javax.faces.context.FacesContext;
 import javax.faces.event.FacesEvent;
+import javax.faces.event.ValueChangeListener;
 
-import javax.faces.application.MockApplication;
-import javax.faces.component.MockUIComponent;
-import javax.faces.context.MockFacesContext;
-import javax.faces.convert.MockConverter;
-import javax.faces.el.MockValueBinding;
-import javax.faces.event.MockValueChangeListener;
-import javax.faces.render.MockRenderKit;
-import javax.faces.render.MockRenderKitFactory;
-import javax.faces.render.MockRenderer;
-import javax.faces.validator.MockValidator;
+import javax.faces.convert.Converter;
+import javax.faces.el.ValueBinding;
+import javax.faces.render.RenderKit;
+import javax.faces.render.RenderKitFactory;
+import javax.faces.render.Renderer;
+import javax.faces.validator.Validator;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
 
 import org.apache.myfaces.adf.event.AttributeChangeEvent;
 import org.apache.myfaces.adfbuild.test.FacesTestCase;
+import org.jmock.Mock;
+import org.jmock.core.Constraint;
 
 /**
  * Base class for JavaServer Faces UIComponent unit tests.
@@ -64,6 +65,21 @@
   {
     super(testName);
   }
+  
+  public void setUp()
+  {
+    super.setUp();
+  }
+  
+  public void tearDown()
+  {
+    super.tearDown();
+  }
+  
+  public static Test suite()
+  {
+    return new TestSuite(UIComponentTestCase.class);
+  }
 
   /**
    * Tests the transparency of the component attribute by comparing
@@ -156,11 +172,16 @@
     UIComponent component,
     String      facetName)
   {
-    MockUIComponent facetValue = new MockUIComponent();
-    facetValue.setupGetParent(null);
-    MockUIComponent propValue = new MockUIComponent();
-    propValue.setupGetParent(null);
-
+    Mock mockFacetValue = mock(UIComponent.class);
+    UIComponent facetValue = (UIComponent) mockFacetValue.proxy();
+    mockFacetValue.stubs().method("getParent").will(returnValue(null));
+    mockFacetValue.stubs().method("setParent");
+
+    Mock mockPropValue = mock(UIComponent.class);
+    UIComponent propValue = (UIComponent) mockPropValue.proxy();
+    mockPropValue.stubs().method("getParent").will(returnValue(null));
+    mockPropValue.stubs().method("setParent");
+    
     Map facetMap = component.getFacets();
     try
     {
@@ -210,8 +231,8 @@
     }
     finally
     {
-      facetValue.verify();
-      propValue.verify();
+      mockFacetValue.verify();
+      mockPropValue.verify();
     }
   }
 
@@ -232,36 +253,33 @@
     UIViewRoot  root,
     UIComponent component)
   {
-    MockRenderKitFactory factory = setupMockRenderKitFactory();
-    MockRenderKit renderkit = new MockRenderKit();
-    MockRenderer renderer = new MockRenderer();
-    MockFacesContext context = createMockFacesContext(component);
-    setCurrentContext(context);
-
-    factory.setupGetRenderKit(renderkit);
-    renderkit.setupGetRenderer(renderer);
-    context.setupGetRenderResponse(false);
-    context.setupGetResponseComplete(false);
-    context.setupGetRenderKit(renderkit);
+    
+    Mock mockRenderKitFactory = mock(RenderKitFactory.class);
+    RenderKitFactory factory = (RenderKitFactory) mockRenderKitFactory.proxy();
 
-    context.setupGetViewRoot(root);
+    Mock mockRenderkit = getMockRenderKitWrapper().getMock();
+    RenderKit renderkit = getMockRenderKitWrapper().getRenderKit();
+
+    Mock mockRenderer = mock(Renderer.class);
+    Renderer renderer = (Renderer) mockRenderer.proxy();
+    
+    mockRenderKitFactory.stubs().method("getRenderKit").will(returnValue(renderkit));
+    mockRenderkit.stubs().method("getRenderer").will(returnValue(renderer));
 
     if (isRendererUsed() && component.isRendered())
     {
-      renderer.addExpectedDecodeValues(context, component);
-      renderer.setExpectedDecodeCalls(1);
+      mockRenderer.expects(once()).method("decode");
     }
     else
     {
-      renderer.setExpectedDecodeCalls(0);
+      mockRenderer.expects(never()).method("decode");
     }
 
-    doTestApplyRequestValues(context, root, component);
+    doTestApplyRequestValues(facesContext, root, component);
 
-    factory.verify();
-    renderkit.verify();
-    renderer.verify();
-    context.verify();
+    mockRenderKitFactory.verify();
+    mockRenderkit.verify();
+    mockRenderer.verify();
 
     setCurrentContext(null);
   }
@@ -272,12 +290,15 @@
     UIViewRoot   root,
     UIComponent  component)
   {
-    MockUIComponent child = createMockUIComponent();
+    
+    Mock mock = createMockUIComponent();
+    UIComponent child = (UIComponent) mock.proxy();
+    
     // JavaServer Faces 1.0 Specification, section 2.2.2
     // During the apply-request-values phase,
     // only the processDecodes lifecycle method may be called.
     if (willChildrenBeProcessed(component))
-      child.setExpectedProcessDecodesCalls(1);
+      mock.expects(once()).method("processDecodes");
 
     // construct the UIComponent tree and
     // execute the apply-request-values lifecycle phase
@@ -298,21 +319,14 @@
       ace.queue();
     }
 
+    Renderer r = this.facesContext.getRenderKit().getRenderer("", "");
+    
     root.processDecodes(context);
 
     if (attributeChangeTester != null)
       attributeChangeTester.verify();
 
-    child.verify();
-  }
-
-  /**
-   * Create the MockFacesContext to use for testing.
-   */
-  protected MockFacesContext createMockFacesContext(UIComponent comp)
-  {
-    MockFacesContext context = new MockFacesContext();
-    return context;
+    mock.verify();
   }
 
   /**
@@ -345,42 +359,42 @@
     Object      submittedValue,
     Object      convertedValue)
   {
-    MockRenderKitFactory factory = setupMockRenderKitFactory();
-    MockRenderKit renderkit = new MockRenderKit();
-    MockRenderer renderer = new MockRenderer();
-    MockFacesContext context = createMockFacesContext(component);
-    MockConverter converter = new MockConverter();
-    MockValidator validator = new MockValidator();
-    MockValueChangeListener listener = new MockValueChangeListener();
-
-    setCurrentContext(context);
-
-    factory.setupGetRenderKit(renderkit);
-    renderkit.setupGetRenderer(renderer);
-    context.setupGetRenderKit(renderkit);
-    context.setupGetRenderResponse(false);
-    context.setupGetResponseComplete(false);
-
-    context.setupGetViewRoot(root);
+    
+    Mock mockRenderKit = getMockRenderKitWrapper().getMock();
+    RenderKit renderKit = getMockRenderKitWrapper().getRenderKit();
+    
+    Mock mockRenderer = mock(Renderer.class);
+    Renderer renderer = (Renderer) mockRenderer.proxy();
+    mockRenderKit.stubs().method("getRenderer").will(returnValue(renderer));
+    
+    Mock mockConverter = mock(Converter.class);
+    Converter converter = (Converter) mockConverter.proxy();
+    
+    Mock mockValidator = mock(Validator.class);
+    Validator validator = (Validator) mockValidator.proxy();
+    
+    Mock mockListener = mock(ValueChangeListener.class);
+    ValueChangeListener listener = (ValueChangeListener) mockListener.proxy();
+    
+    setCurrentContext(facesContext);
 
     // if the component is an EditableValueHolder, then the submitted value
     // must be converted and validated before this phase completes.
     if (component instanceof EditableValueHolder)
     {
+      
       EditableValueHolder editable = (EditableValueHolder)component;
-      renderer.setupGetConvertedValue(convertedValue);
-      converter.setExpectedGetAsObjectCalls(0);
-      converter.setExpectedGetAsStringCalls(0);
-      renderer.setExpectedGetConvertedValueCalls(1);
+      mockConverter.expects(never()).method("getAsObject");
+      mockConverter.expects(never()).method("getAsString"); 
+      mockRenderer.expects(once()).method("getConvertedValue").will(returnValue(convertedValue));
       editable.setConverter(converter);
       editable.setSubmittedValue(submittedValue);
       editable.addValidator(validator);
       editable.addValueChangeListener(listener);
 
-      validator.addExpectedValidateValues(context, component,
-                                          convertedValue);
-      validator.setExpectedValidateCalls(1);
-      listener.setExpectedProcessValueChangeCalls(1);
+      mockListener.expects(once()).method("processValueChange");
+      mockValidator.expects(once()).method("validate").with(new Constraint[]  { eq(facesContext), eq(component), eq(convertedValue) });
+
     }
     // if the component is a ValueHolder, then the value is not updated or
     // validated and no value change event occurs.
@@ -388,19 +402,17 @@
     {
       ValueHolder holder = (ValueHolder)component;
       holder.setConverter(converter);
-      converter.setExpectedGetAsStringCalls(0);
-      converter.setExpectedGetAsObjectCalls(0);
+      mockConverter.expects(never()).method("getAsObject");//setExpectedGetAsObjectCalls(0);
+      mockConverter.expects(never()).method("getAsString"); 
     }
 
-    doTestProcessValidations(context, root, component);
+    doTestProcessValidations(facesContext, root, component);
 
-    factory.verify();
-    renderkit.verify();
-    renderer.verify();
-    context.verify();
-    converter.verify();
-    validator.verify();
-    listener.verify();
+    mockRenderKit.verify();
+    mockRenderer.verify();
+    mockConverter.verify();
+    mockValidator.verify();
+    mockListener.verify();
 
     setCurrentContext(null);
   }
@@ -411,21 +423,25 @@
     UIViewRoot   root,
     UIComponent  component)
   {
-    MockUIComponent child = createMockUIComponent();
+    
+    Mock mock = createMockUIComponent();
+    UIComponent child = (UIComponent) mock.proxy();
+    
     // JavaServer Faces 1.0 Specification, section 2.2.3
     // During the process-validations phase,
     // only the processValidators lifecycle method may be called.
     if (willChildrenBeProcessed(component))
-      child.setExpectedProcessValidatorsCalls(1);
+      mock.expects(once()).method("processValidators");
 
     // construct the UIComponent tree and
     // execute the apply-request-values lifecycle phase
     if (component.getParent() == null)
       root.getChildren().add(component);
     component.getChildren().add(child);
+        
     root.processValidators(context);
 
-    child.verify();
+    mock.verify();
   }
 
   /**
@@ -445,21 +461,18 @@
     UIViewRoot  root,
     UIComponent component)
   {
-    MockRenderKitFactory factory = setupMockRenderKitFactory();
-    MockRenderKit renderkit = new MockRenderKit();
-    MockRenderer renderer = new MockRenderer();
-    MockFacesContext context = createMockFacesContext(component);
-    MockValueBinding binding = new MockValueBinding();
-
-    factory.setupGetRenderKit(renderkit);
-    renderkit.setupGetRenderer(renderer);
-    context.setupGetRenderResponse(false);
-    context.setupGetResponseComplete(false);
-    context.setupGetRenderKit(renderkit);
 
-    setCurrentContext(context);
+    Mock mockRenderkit = getMockRenderKitWrapper().getMock();
+    RenderKit renderkit = getMockRenderKitWrapper().getRenderKit();
+    
+    Mock mockRenderer = mock(Renderer.class);
+    Renderer renderer = (Renderer) mockRenderer.proxy();
+    mockRenderkit.stubs().method("getRenderer").will(returnValue(renderer));
+    
+    Mock mockBinding = mock(ValueBinding.class);
+    ValueBinding binding = (ValueBinding) mockBinding.proxy();
 
-    context.setupGetViewRoot(root);
+    setCurrentContext(facesContext);
 
     // if the component is an EditableValueHolder, then the value binding
     // must be updated with the new value before this phase completes.
@@ -468,20 +481,17 @@
       EditableValueHolder editable = (EditableValueHolder)component;
       component.setValueBinding("value", binding);
       editable.setValue("newValue");
-      binding.addExpectedSetValueValues(context, "newValue");
+      mockBinding.expects(atLeastOnce()).method("setValue").with(eq(facesContext), eq("newValue"));
 
       assertEquals(true, editable.isLocalValueSet());
     }
 
-    doTestUpdateModelValues(context, root, component);
+    doTestUpdateModelValues(facesContext, root, component);
 
     setCurrentContext(null);
 
-    factory.verify();
-    renderkit.verify();
-    renderer.verify();
-    context.verify();
-    binding.verify();
+    mockRenderer.verify();
+    mockBinding.verify();
   }
 
 
@@ -490,13 +500,14 @@
     UIViewRoot   root,
     UIComponent  component)
   {
-    MockUIComponent child = createMockUIComponent();
+    Mock mock = createMockUIComponent();
+    UIComponent child = (UIComponent) mock.proxy();
 
     // JavaServer Faces 1.0 Specification, section 2.2.4
     // During the update-model-values phase,
     // only the processUpdates lifecycle method may be called.
     if (willChildrenBeProcessed(component))
-      child.setExpectedProcessUpdatesCalls(1);
+      mock.expects(once()).method("processUpdates");
 
     // construct the UIComponent tree and
     // execute the apply-request-values lifecycle phase
@@ -505,7 +516,7 @@
     component.getChildren().add(child);
     root.processUpdates(context);
 
-    child.verify();
+    mock.verify();
   }
 
   /**
@@ -515,25 +526,12 @@
     UIComponent   component,
     FacesEvent    event)
   {
-    MockApplication application = new MockApplication();
-    MockFacesContext context = new MockFacesContext();
-
     try
     {
-      setCurrentContext(context);
-
-      UIViewRoot root = new UIViewRoot();
-      context.setupGetViewRoot(root);
+      setCurrentContext(facesContext);
 
-      context.setupGetApplication(application);
-      context.setupGetRenderResponse(false);
-      context.setupGetResponseComplete(false);
-      application.setupGetActionListener(null);
+      doTestInvokeApplication(facesContext, facesContext.getViewRoot(), component, event);
 
-      doTestInvokeApplication(context, root, component, event);
-
-      application.verify();
-      context.verify();
     }
     finally
     {
@@ -549,7 +547,9 @@
     UIComponent  component,
     FacesEvent   event)
   {
-    MockUIComponent child = createMockUIComponent();
+    
+    Mock mock = createMockUIComponent();
+    UIComponent child = (UIComponent) mock.proxy();
     // JavaServer Faces 1.0 Specification, section 2.2.5
     // During the invoke-application phase,
     // no per-component lifecycle methods may be called.
@@ -563,7 +563,7 @@
     component.getChildren().add(child);
     root.processApplication(context);
 
-    child.verify();
+    mock.verify();
   }
 
   /**
@@ -574,56 +574,56 @@
   protected void doTestRenderResponse(
     UIComponent component) throws IOException
   {
-    MockRenderKitFactory factory = setupMockRenderKitFactory();
-    MockRenderKit renderkit = new MockRenderKit();
-    MockRenderer renderer = new MockRenderer();
-    MockFacesContext context = new MockFacesContext();
-    MockValidator validator = new MockValidator();
-    MockUIComponent child = new MockUIComponent();
-
-    factory.setupGetRenderKit(renderkit);
-    renderkit.setupGetRenderer(renderer);
-    context.setupGetRenderKit(renderkit);
-    context.setupGetRenderResponse(false);
-    context.setupGetResponseComplete(false);
-
-    child.setupGetParent(null);
-    child.setupGetRendersChildren(true);
-    child.setupIsTransient(false);
-    child.setupProcessSaveState("ChildState");
+    
+//    MockRenderKitFactory factory = setupMockRenderKitFactory();
+    
+    Mock mockRenderkit = getMockRenderKitWrapper().getMock();
+    RenderKit renderkit = getMockRenderKitWrapper().getRenderKit();
+    
+    Mock mockRenderer = mock(Renderer.class);
+    Renderer renderer = (Renderer) mockRenderer.proxy();
+    mockRenderkit.stubs().method("getRenderer").will(returnValue(renderer));
+
+    Mock mockChild = createMockUIComponent(); //mock(UIComponent.class);
+    UIComponent child = (UIComponent) mockChild.proxy();
+
+    mockChild.expects(atLeastOnce()).method("getParent").will(returnValue(null));    
+    mockChild.expects(atLeastOnce()).method("isTransient").will(returnValue(false));
+    mockChild.expects(atLeastOnce()).method("getRendersChildren").will(returnValue(true));
 
     UIViewRoot root = new UIViewRoot();
-    context.setupGetViewRoot(root);
 
-    renderer.setupGetRendersChildren(false);
-    renderer.setExpectedDecodeCalls(0);
-    renderer.setExpectedGetConvertedValueCalls(0);
-
-    renderer.setExpectedEncodeChildrenCalls(0);
+    mockRenderer.expects(atLeastOnce()).method("getRendersChildren").will(returnValue(false));
+    mockRenderer.expects(never()).method("decode");
+    mockRenderer.expects(never()).method("getConvertedValue");
+    mockRenderer.expects(never()).method("encodeChildren");
+    
     if (isRendererUsed())
     {
-      renderer.setExpectedEncodeBeginCalls(1);
-      renderer.setExpectedEncodeEndCalls(1);
+      mockRenderer.expects(once()).method("encodeBegin");
+      mockRenderer.expects(once()).method("encodeEnd");
     }
     else
     {
-      renderer.setExpectedEncodeBeginCalls(0);
-      renderer.setExpectedEncodeEndCalls(0);
+      mockRenderer.expects(never()).method("encodeBegin");
+      mockRenderer.expects(never()).method("encodeEnd");
     }
 
     // JavaServer Faces 1.0 Specification, section 2.2.6
     // During the render-response phase,
     // only the encodeBegin, encodeEnd, encodeChildren
     // and processSaveState lifecycle methods may be called.
-    child.setExpectedProcessRestoreStateCalls(0);
-    child.setExpectedProcessDecodesCalls(0);
-    child.setExpectedProcessValidatorsCalls(0);
-    child.setExpectedProcessUpdatesCalls(0);
-    child.setExpectedProcessSaveStateCalls(1);
+    mockChild.expects(never()).method("processRestoreState");
+    mockChild.expects(never()).method("processDecodes");
+    mockChild.expects(never()).method("processValidators");
+    mockChild.expects(never()).method("processUpdates");
+    mockChild.expects(once()).method("processSaveState");
     int encodeCalls = willChildrenBeRendered(component) ? 1 : 0;
-    child.setExpectedEncodeBeginCalls(encodeCalls);
-    child.setExpectedEncodeChildrenCalls(encodeCalls);
-    child.setExpectedEncodeEndCalls(encodeCalls);
+    
+    //fix this!
+    mockChild.expects(once()).method("encodeBegin");
+    mockChild.expects(once()).method("encodeChildren");
+    mockChild.expects(once()).method("encodeEnd");
 
     root.getChildren().add(component);
     component.getChildren().add(child);
@@ -631,56 +631,39 @@
     FacesContext current = FacesContext.getCurrentInstance();
     try
     {
-      TestFacesContext.setCurrentInstance(context);
-      root.processSaveState(context);
-      doRenderResponse(context, root);
+      TestFacesContext.setCurrentInstance(facesContext);
+      root.processSaveState(facesContext);
+      doRenderResponse(facesContext, root);
     }
     finally
     {
       TestFacesContext.setCurrentInstance(current);
     }
 
-    factory.verify();
-    renderkit.verify();
-    renderer.verify();
-    context.verify();
-    validator.verify();
-    child.verify();
+    mockRenderer.verify();
+    mockChild.verify();
   }
 
   protected void doTestValidateFailure(
     UIViewRoot root)
   {
-    MockRenderKitFactory factory = setupMockRenderKitFactory();
-    MockRenderKit renderkit = new MockRenderKit();
-    MockRenderer renderer = new MockRenderer();
-    MockApplication application = new MockApplication();
-    MockViewHandler viewhandler = new MockViewHandler();
-    MockFacesContext context = new MockFacesContext();
-
-    setCurrentContext(context);
-
-    factory.setupGetRenderKit(renderkit);
-    renderer.setupConvertClientId("clientId");
-    renderkit.setupGetRenderer(renderer);
-    viewhandler.setupCalculateLocale(Locale.getDefault());
-    application.setupGetViewHandler(viewhandler);
-    context.setupGetViewRoot(root);
-    context.setupGetApplication(application);
-    context.setupGetRenderKit(renderkit);
-    context.setupGetRenderResponse(false);
-    context.setupGetResponseComplete(false);
-    
-    // these are called because of validation failure for required
-    context.setExpectedAddMessageCalls(1);
-    context.setExpectedRenderResponseCalls(1);
+    
+    Mock mockRenderkit = getMockRenderKitWrapper().getMock();
+    RenderKit renderkit = getMockRenderKitWrapper().getRenderKit();
+    
+    Mock mockRenderer = mock(Renderer.class);
+    Renderer renderer = (Renderer) mockRenderer.proxy();
+    
+    Mock mockValidator = mock(Validator.class);
+    Validator validator = (Validator) mockValidator.proxy();
+    
+    ViewHandler viewhandler = this.facesContext.getApplication().getViewHandler();
 
-    root.processValidators(context);
+    setCurrentContext(facesContext);
+    
+    root.processValidators(facesContext);
 
-    factory.verify();
-    renderkit.verify();
-    renderer.verify();
-    context.verify();
+    mockRenderer.verify();
 
     setCurrentContext(null);
   }
@@ -691,19 +674,22 @@
    * have any invoked, override the "expected calls" for
    * that lifecycle method.
    */
-  protected MockUIComponent createMockUIComponent()
+  protected Mock createMockUIComponent()
   {
-    MockUIComponent child = new MockUIComponent();
-    child.setupGetParent(null);
-    child.setExpectedProcessRestoreStateCalls(0);
-    child.setExpectedProcessDecodesCalls(0);
-    child.setExpectedProcessValidatorsCalls(0);
-    child.setExpectedProcessUpdatesCalls(0);
-    child.setExpectedProcessSaveStateCalls(0);
-    child.setExpectedEncodeBeginCalls(0);
-    child.setExpectedEncodeChildrenCalls(0);
-    child.setExpectedEncodeEndCalls(0);
-    return child;
+    Mock mock = mock(UIComponent.class);
+    
+    mock.stubs().method("getParent").will(returnValue(null));
+    mock.stubs().method("setParent");
+    mock.expects(never()).method("processRestoreState");
+    mock.expects(never()).method("processDecodes");
+    mock.expects(never()).method("processValidators");
+    mock.expects(never()).method("processUpdates");
+    mock.expects(never()).method("processSaveState");
+    mock.expects(never()).method("encodeBegin");
+    mock.expects(never()).method("encodeChildren");
+    mock.expects(never()).method("encodeEnd");
+    
+    return mock;
   }
 
   protected boolean willChildrenBeProcessed(UIComponent component)
@@ -727,4 +713,4 @@
   }
   
   private boolean _isRendererUsed = true;
-}
+}
\ No newline at end of file

Modified: incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/UIXInputTest.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/UIXInputTest.java?rev=421025&r1=421024&r2=421025&view=diff
==============================================================================
--- incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/UIXInputTest.java (original)
+++ incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/UIXInputTest.java Tue Jul 11 16:29:16 2006
@@ -15,8 +15,12 @@
  */
 package org.apache.myfaces.adf.component;
 
-import javax.faces.el.MockValueBinding;
+import javax.faces.el.ValueBinding;
 
+import org.jmock.Mock;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
 import junit.textui.TestRunner;
 
 /**
@@ -34,6 +38,21 @@
   {
     super(testName);
   }
+  
+  public void setUp()
+  {
+    super.setUp();
+  }
+  
+  public void tearDown()
+  {
+    super.tearDown();
+  }
+  
+  public static Test suite()
+  {
+    return new TestSuite(UIXInputTest.class);
+  }
 
   /**
    * Tests the initial values for the component attributes.
@@ -72,8 +91,9 @@
     assertNull(input.getValue());
     
     // setup a valueBinding
-    MockValueBinding binding = new MockValueBinding();
-    binding.setupGetValue(Boolean.TRUE);
+    Mock mockBinding = mock(ValueBinding.class);
+    ValueBinding binding = (ValueBinding) mockBinding.proxy();
+    mockBinding.expects(atLeastOnce()).method("getValue").will(returnValue(Boolean.TRUE));//  setupGetValue(Boolean.TRUE);
     
     input.setValueBinding("value", binding);
     assertFalse(input.isLocalValueSet());

Modified: incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/UIXProcessTest.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/UIXProcessTest.java?rev=421025&r1=421024&r2=421025&view=diff
==============================================================================
--- incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/UIXProcessTest.java (original)
+++ incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/UIXProcessTest.java Tue Jul 11 16:29:16 2006
@@ -17,6 +17,8 @@
 
 import java.io.IOException;
 
+import junit.framework.Test;
+import junit.framework.TestSuite;
 import junit.textui.TestRunner;
 
 import org.apache.myfaces.adf.component.UIComponentTestCase;
@@ -37,6 +39,21 @@
     String testName)
   {
     super(testName);
+  }
+  
+  public void setUp()
+  {
+    super.setUp();
+  }
+  
+  public void tearDown()
+  {
+    super.tearDown();
+  }
+  
+  public static Test suite()
+  {
+    return new TestSuite(UIXProcessTest.class);
   }
 
   public static void main(String[] args)

Modified: incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/UIXSelectManyTest.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/UIXSelectManyTest.java?rev=421025&r1=421024&r2=421025&view=diff
==============================================================================
--- incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/UIXSelectManyTest.java (original)
+++ incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/UIXSelectManyTest.java Tue Jul 11 16:29:16 2006
@@ -21,6 +21,9 @@
 import java.util.Map;
 
 import javax.faces.validator.Validator;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
 /**
  * Unit tests for UIXSelectMany.
  *
@@ -38,6 +41,21 @@
     String testName)
   {
     super(testName);
+  }
+  
+  public void setUp()
+  {
+    super.setUp();
+  }
+  
+  public void tearDown()
+  {
+    super.tearDown();
+  }
+  
+  public static Test suite()
+  {
+    return new TestSuite(UIXSelectManyTest.class);
   }
 
   /**

Modified: incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/UIXShowDetailTest.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/UIXShowDetailTest.java?rev=421025&r1=421024&r2=421025&view=diff
==============================================================================
--- incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/UIXShowDetailTest.java (original)
+++ incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/UIXShowDetailTest.java Tue Jul 11 16:29:16 2006
@@ -19,6 +19,8 @@
 
 import javax.faces.component.UIComponent;
 
+import junit.framework.Test;
+import junit.framework.TestSuite;
 import junit.textui.TestRunner;
 
 import org.apache.myfaces.adf.component.UIComponentTestCase;
@@ -39,6 +41,21 @@
     String testName)
   {
     super(testName);
+  }
+  
+  public void setUp()
+  {
+    super.setUp();
+  }
+  
+  public void tearDown()
+  {
+    super.tearDown();
+  }
+  
+  public static Test suite()
+  {
+    return new TestSuite(UIXShowDetailTest.class);
   }
 
   /**

Modified: incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/UIXSwitcherTest.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/UIXSwitcherTest.java?rev=421025&r1=421024&r2=421025&view=diff
==============================================================================
--- incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/UIXSwitcherTest.java (original)
+++ incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/UIXSwitcherTest.java Tue Jul 11 16:29:16 2006
@@ -19,11 +19,13 @@
 import javax.faces.component.UIViewRoot;
 import javax.faces.context.FacesContext;
 
+import junit.framework.Test;
+import junit.framework.TestSuite;
 import junit.textui.TestRunner;
 
 import org.apache.myfaces.adf.component.UIComponentTestCase;
+import org.jmock.Mock;
 
-import javax.faces.component.MockUIComponent;
 
 /**
  * Unit tests for UIXSwitcher.
@@ -42,6 +44,21 @@
   {
     super(testName);
   }
+  
+  public void setUp()
+  {
+    super.setUp();
+  }
+  
+  public void tearDown()
+  {
+    super.tearDown();
+  }
+  
+  public static Test suite()
+  {
+    return new TestSuite(UIXSwitcherTest.class);
+  }
 
   /**
    * Tests the initial values for the component attributes.
@@ -91,16 +108,23 @@
     UIViewRoot   root,
     UIComponent  component)
   {
-    MockUIComponent fooChild = createMockUIComponent();
+
+    Mock mockUIComponent = createMockUIComponent();
+    UIComponent fooChild = (UIComponent) mockUIComponent.proxy();
+    
     // JavaServer Faces 1.0 Specification, section 2.2.2
     // During the apply-request-values phase,
     // only the processDecodes lifecycle method may be called.
-    if (component.isRendered())
-      fooChild.setExpectedProcessDecodesCalls(1);
+    if (component.isRendered()){
+      mockUIComponent.stubs().method("processDecodes").with(eq(facesContext));
+    }
 
     // These children will never get called
-    MockUIComponent barChild = createMockUIComponent();
-    MockUIComponent ordinaryChild = createMockUIComponent();
+    Mock mockBarChild = createMockUIComponent();
+    UIComponent barChild = (UIComponent) mockBarChild.proxy();
+    
+    Mock mockOrdinaryChild = createMockUIComponent();
+    UIComponent ordinaryChild = (UIComponent) mockOrdinaryChild.proxy();
 
     // construct the UIComponent tree and
     // execute the apply-request-values lifecycle phase
@@ -110,9 +134,9 @@
     component.getChildren().add(ordinaryChild);
     root.processDecodes(context);
 
-    fooChild.verify();
-    barChild.verify();
-    ordinaryChild.verify();
+    mockUIComponent.verify();
+    mockBarChild.verify();
+    mockOrdinaryChild.verify();
   }
 
 
@@ -133,15 +157,21 @@
     UIViewRoot   root,
     UIComponent  component)
   {
-    MockUIComponent fooChild = createMockUIComponent();
+    
+    Mock mockUIComponent = createMockUIComponent();//mock(UIComponent.class);
+    UIComponent fooChild = (UIComponent) mockUIComponent.proxy();
+    
     // JavaServer Faces 1.0 Specification, section 2.2.2
     // During the apply-request-values phase,
     // only the processDecodes lifecycle method may be called.
-    fooChild.setExpectedProcessValidatorsCalls(1);
+    mockUIComponent.expects(once()).method("processValidators");
 
     // These children will never get called
-    MockUIComponent barChild = createMockUIComponent();
-    MockUIComponent ordinaryChild = createMockUIComponent();
+    Mock mockBarChild = createMockUIComponent();
+    UIComponent barChild = (UIComponent) mockBarChild.proxy();
+    
+    Mock mockOrdinaryChild = createMockUIComponent();
+    UIComponent ordinaryChild = (UIComponent) mockOrdinaryChild.proxy(); 
 
     // construct the UIComponent tree and
     // execute the apply-request-values lifecycle phase
@@ -151,9 +181,9 @@
     component.getChildren().add(ordinaryChild);
     root.processValidators(context);
 
-    fooChild.verify();
-    barChild.verify();
-    ordinaryChild.verify();
+    mockUIComponent.verify();
+    mockBarChild.verify();
+    mockOrdinaryChild.verify();
   }
 
 
@@ -175,15 +205,19 @@
     UIViewRoot   root,
     UIComponent  component)
   {
-    MockUIComponent fooChild = createMockUIComponent();
+    Mock mockUIComponent = createMockUIComponent();
+    UIComponent fooChild = (UIComponent) mockUIComponent.proxy();
     // JavaServer Faces 1.0 Specification, section 2.2.2
     // During the apply-request-values phase,
     // only the processDecodes lifecycle method may be called.
-    fooChild.setExpectedProcessUpdatesCalls(1);
+    mockUIComponent.expects(once()).method("processUpdates");
 
     // These children will never get called
-    MockUIComponent barChild = createMockUIComponent();
-    MockUIComponent ordinaryChild = createMockUIComponent();
+    Mock mockBarChild = createMockUIComponent();
+    UIComponent barChild = (UIComponent) mockBarChild.proxy();
+    
+    Mock mockOrdinaryChild = createMockUIComponent();
+    UIComponent ordinaryChild = (UIComponent) mockOrdinaryChild.proxy();
 
     // construct the UIComponent tree and
     // execute the apply-request-values lifecycle phase
@@ -193,9 +227,9 @@
     component.getChildren().add(ordinaryChild);
     root.processUpdates(context);
 
-    fooChild.verify();
-    barChild.verify();
-    ordinaryChild.verify();
+    mockUIComponent.verify();
+    mockBarChild.verify();
+    mockOrdinaryChild.verify();
   }
 
   public static void main(String[] args)

Modified: incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/UIXTableTest.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/UIXTableTest.java?rev=421025&r1=421024&r2=421025&view=diff
==============================================================================
--- incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/UIXTableTest.java (original)
+++ incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/UIXTableTest.java Tue Jul 11 16:29:16 2006
@@ -30,16 +30,14 @@
 import javax.faces.render.Renderer;
 
 import junit.framework.AssertionFailedError;
+import junit.framework.Test;
+import junit.framework.TestSuite;
 
 import junit.textui.TestRunner;
 
 import org.apache.myfaces.adf.model.ModelUtils;
 import org.apache.myfaces.adf.model.SortableModel;
 
-import javax.faces.context.MockFacesContext;
-
-import org.apache.myfaces.adfbuild.test.MockFContext;
-
 /**
  * Unit tests for UIXTable
  *
@@ -55,6 +53,21 @@
   {
     super(testName);
   }
+  
+  public void setUp()
+  {
+    super.setUp();
+  }
+  
+  public void tearDown()
+  {
+    super.tearDown();
+  }
+  
+  public static Test suite()
+  {
+    return new TestSuite(UIXTableTest.class);
+  }
 
   /**
    * Tests the initial values for the component attributes.
@@ -65,7 +78,6 @@
     assertEquals(25, table.getRows());
     assertEquals(0, table.getFirst());
     assertFalse(table.isImmediate());
-    MockFContext.clearContext();
   }
 
   /**
@@ -81,7 +93,6 @@
     doTestAttributeTransparency(table, "first", new Integer(0), new Integer(1));
     doTestAttributeTransparency(table, "immediate", Boolean.TRUE, Boolean.FALSE);
     doTestAttributeTransparency(table, "rows", new Integer(30), new Integer(10));
-    MockFContext.clearContext();
   }
 
   public void testModelMethods()
@@ -102,7 +113,6 @@
     assertEquals(-1, model.getRowIndex());
     assertEquals(model.getRowKey(), table.getRowKey());
     assertEquals(model.isRowAvailable(), table.isRowAvailable());
-    MockFContext.clearContext();
   }
 
   public void testProcessDecodes()
@@ -120,7 +130,6 @@
     List detailData = table.detailStamp.getDecodesRowData();
     _testDetailStamp(table, detailData);
 
-    MockFContext.clearContext();
   }
 
   public void testProcessValidators()
@@ -138,7 +147,6 @@
     List detailData = table.detailStamp.getValidatesRowData();
     _testDetailStamp(table, detailData);
 
-    MockFContext.clearContext();
   }
 
   public void testProcessUpdates()
@@ -156,7 +164,6 @@
     List detailData = table.detailStamp.getUpdatesRowData();
     _testDetailStamp(table, detailData);
 
-    MockFContext.clearContext();
   }
 
   public void testEditableValueHolderChildren()
@@ -165,8 +172,6 @@
     UIXInput testComp = table.column1Child;
     UIXInput detailStamp = table.detailStamp;
 
-    createMockFacesContext(table); // sets up the facesContext on the thread.
-
     // initialize:
     table.setRowIndex(0);
     _setEVHData(testComp, "Foo", true);
@@ -185,7 +190,6 @@
     _testEVHData(testComp, "Bar", false);
     _testEVHData(detailStamp, "Bar-ds", true);
 
-    MockFContext.clearContext();
   }
 
 
@@ -196,8 +200,6 @@
       TestTable table = _createTable();
 
       UIXInput testComp = table.column1Child;
-      FacesContext fc =
-        createMockFacesContext(table); // sets up the facesContext on the thread.
 
       // initialize:
       table.setRowIndex(0);
@@ -210,14 +212,12 @@
       // processSaveState should store the stamp data even though rowIndex was
       // not changed.
 
-      state = table.processSaveState(fc);
+      state = table.processSaveState(facesContext);
     }
 
     TestTable table = _createTable();
     UIXInput testComp = table.column1Child;
-    FacesContext fc =
-      createMockFacesContext(table); // sets up the facesContext on the thread.
-    table.processRestoreState(fc, state);
+    table.processRestoreState(facesContext, state);
 
     // now test:
     table.setRowIndex(0);
@@ -226,7 +226,6 @@
     table.setRowIndex(1);
     _testEVHData(testComp, "Bar", false);
 
-    MockFContext.clearContext();
   }
 
   /**
@@ -246,9 +245,7 @@
       TestTable table = _createTable(false);
       table.setValue(null); // instead use the valueBinding below:
       table.setValueBinding("value", doNotCall);
-      FacesContext fc =
-        createMockFacesContext(table); // sets up the facesContext on the thread.
-      state = table.processSaveState(fc);
+      state = table.processSaveState(facesContext);
     }
 
     TestTable table = _createTable(false);
@@ -257,13 +254,10 @@
     // however, set it anyway just to catch any getValue() calls prior to
     // that.
     table.setValueBinding("value", doNotCall);
-    FacesContext fc =
-      createMockFacesContext(table); // sets up the facesContext on the thread.
-    table.processRestoreState(fc, state);
+    table.processRestoreState(facesContext, state);
 
     assertTrue(table.getValueBinding("value") instanceof DoNotCallBinding);
 
-    MockFContext.clearContext();
   }
 
   public void testNotRenderedSaveRestoreState()
@@ -277,20 +271,15 @@
       TestTable table = _createTable(false);
       table.setRendered(false);
       panel.getChildren().add(table);
-      FacesContext fc =
-        createMockFacesContext(panel); // sets up the facesContext on the thread.
-      state = panel.processSaveState(fc);
+      state = panel.processSaveState(facesContext);
     }
 
     UIXPanel panel = new UIXPanel();
     TestTable table = _createTable(false);
     panel.getChildren().add(table);
 
-    FacesContext fc =
-      createMockFacesContext(panel); // sets up the facesContext on the thread.
-    panel.processRestoreState(fc, state);
+    panel.processRestoreState(facesContext, state);
 
-    MockFContext.clearContext();
   }
 
   protected void doTestUpdateModelValues(
@@ -375,12 +364,6 @@
     root.processDecodes(context);
   }
 
-  protected MockFacesContext createMockFacesContext(UIComponent comp)
-  {
-    MockFContext context = new MockFContext();
-    return context;
-  }
-
   protected boolean isRendererUsed()
   {
     // we use our own MockRenderer; not the one created by our super class:
@@ -394,7 +377,6 @@
 
   private TestTable _createTable(boolean useModel)
   {
-    new MockFContext(); // sets the facesContext on the thread.
     SortableModel model = useModel ? _createTableData() : null;
     TestTable table = new TestTable(model);
     return table;

Modified: incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/UIXTreeTest.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/UIXTreeTest.java?rev=421025&r1=421024&r2=421025&view=diff
==============================================================================
--- incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/UIXTreeTest.java (original)
+++ incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/UIXTreeTest.java Tue Jul 11 16:29:16 2006
@@ -15,18 +15,15 @@
  */
 package org.apache.myfaces.adf.component;
 
-import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
 
+import junit.framework.Test;
+import junit.framework.TestSuite;
 import junit.textui.TestRunner;
 
 import org.apache.myfaces.adf.component.UIComponentTestCase;
 import org.apache.myfaces.adf.component.UIXTableTest.DoNotCallBinding;
 
-import javax.faces.context.MockFacesContext;
-
-import org.apache.myfaces.adfbuild.test.MockFContext;
-
 /**
  * Unit tests for UIXTree
  *
@@ -42,6 +39,21 @@
   {
     super(testName);
   }
+  
+  public void setUp()
+  {
+    super.setUp();
+  }
+  
+  public void tearDown()
+  {
+    super.tearDown();
+  }
+  
+  public static Test suite()
+  {
+    return new TestSuite(UIXTreeTest.class);
+  }
 
 
   /**
@@ -60,9 +72,7 @@
     {
       UIXTree tree = _createTree();
       tree.setValueBinding("value", doNotCall);
-      FacesContext fc =
-        createMockFacesContext(tree); // sets up the facesContext on the thread.
-      state = tree.processSaveState(fc);
+      state = tree.processSaveState(facesContext);
     }
 
     UIXTree tree = _createTree();
@@ -70,13 +80,10 @@
     // however, set it anyway just to catch any getValue() calls prior to
     // that.
     tree.setValueBinding("value", doNotCall);
-    FacesContext fc =
-      createMockFacesContext(tree); // sets up the facesContext on the thread.
-    tree.processRestoreState(fc, state);
+    tree.processRestoreState(facesContext, state);
 
     assertTrue(tree.getValueBinding("value") instanceof DoNotCallBinding);
 
-    MockFContext.clearContext();
   }
 
 
@@ -94,12 +101,6 @@
   }
 
 
-  protected MockFacesContext createMockFacesContext(UIComponent comp)
-  {
-    MockFContext context = new MockFContext();
-    return context;
-  }
-
   protected boolean isRendererUsed()
   {
     // we use our own MockRenderer; not the one created by our super class:
@@ -108,7 +109,6 @@
 
   private UIXTree _createTree()
   {
-    new MockFContext(); // sets the facesContext on the thread.
     UIXTree tree = new UIXTree();
     return tree;
   }

Modified: incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/CoreFormTest.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/CoreFormTest.java?rev=421025&r1=421024&r2=421025&view=diff
==============================================================================
--- incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/CoreFormTest.java (original)
+++ incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/CoreFormTest.java Tue Jul 11 16:29:16 2006
@@ -20,6 +20,9 @@
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
 
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
 import org.apache.myfaces.adf.component.UIComponentTestCase;
 
 /**
@@ -39,6 +42,21 @@
     String testName)
   {
     super(testName);
+  }
+  
+  public void setUp()
+  {
+    super.setUp();
+  }
+  
+  public void tearDown()
+  {
+    super.tearDown();
+  }
+  
+  public static Test suite()
+  {
+    return new TestSuite(CoreFormTest.class);
   }
 
   /**

Modified: incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/data/CoreColumnTest.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/data/CoreColumnTest.java?rev=421025&r1=421024&r2=421025&view=diff
==============================================================================
--- incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/data/CoreColumnTest.java (original)
+++ incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/data/CoreColumnTest.java Tue Jul 11 16:29:16 2006
@@ -17,6 +17,8 @@
 
 import java.io.IOException;
 
+import junit.framework.Test;
+import junit.framework.TestSuite;
 import junit.textui.TestRunner;
 
 import org.apache.myfaces.adf.component.UIComponentTestCase;
@@ -37,6 +39,21 @@
     String testName)
   {
     super(testName);
+  }
+  
+  public void setUp()
+  {
+    super.setUp();
+  }
+  
+  public void tearDown()
+  {
+    super.tearDown();
+  }
+  
+  public static Test suite()
+  {
+    return new TestSuite(CoreColumnTest.class);
   }
 
   /**

Modified: incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/data/CoreSelectRangeChoiceBarTest.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/data/CoreSelectRangeChoiceBarTest.java?rev=421025&r1=421024&r2=421025&view=diff
==============================================================================
--- incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/data/CoreSelectRangeChoiceBarTest.java (original)
+++ incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/data/CoreSelectRangeChoiceBarTest.java Tue Jul 11 16:29:16 2006
@@ -24,6 +24,8 @@
 import org.apache.myfaces.adf.event.RangeChangeEvent;
 import org.apache.myfaces.adf.event.RangeChangeListener;
 
+import junit.framework.Test;
+import junit.framework.TestSuite;
 import junit.textui.TestRunner;
 
 /**
@@ -42,6 +44,21 @@
     String testName)
   {
     super(testName);
+  }
+  
+  public void setUp()
+  {
+    super.setUp();
+  }
+  
+  public void tearDown()
+  {
+    super.tearDown();
+  }
+  
+  public static Test suite()
+  {
+    return new TestSuite(CoreSelectRangeChoiceBarTest.class);
   }
 
   /**

Modified: incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/input/CoreInputHiddenTest.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/input/CoreInputHiddenTest.java?rev=421025&r1=421024&r2=421025&view=diff
==============================================================================
--- incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/input/CoreInputHiddenTest.java (original)
+++ incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/input/CoreInputHiddenTest.java Tue Jul 11 16:29:16 2006
@@ -15,6 +15,9 @@
  */
 package org.apache.myfaces.adf.component.core.input;
 
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
 import org.apache.myfaces.adf.component.UIXEditableValue;
 import org.apache.myfaces.adf.component.UIXEditableValueTestCase;
 
@@ -35,6 +38,21 @@
     String testName)
   {
     super(testName);
+  }
+  
+  public void setUp()
+  {
+    super.setUp();
+  }
+  
+  public void tearDown()
+  {
+    super.tearDown();
+  }
+  
+  public static Test suite()
+  {
+    return new TestSuite(CoreInputHiddenTest.class);
   }
 
   protected final UIXEditableValue createEditableValue()

Modified: incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/input/CoreSelectBooleanCheckboxTest.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/input/CoreSelectBooleanCheckboxTest.java?rev=421025&r1=421024&r2=421025&view=diff
==============================================================================
--- incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/input/CoreSelectBooleanCheckboxTest.java (original)
+++ incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/input/CoreSelectBooleanCheckboxTest.java Tue Jul 11 16:29:16 2006
@@ -15,6 +15,9 @@
  */
 package org.apache.myfaces.adf.component.core.input;
 
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
 import org.apache.myfaces.adf.component.UIXEditableValue;
 import org.apache.myfaces.adf.component.UIXEditableValueTestCase;
 
@@ -35,6 +38,21 @@
     String testName)
   {
     super(testName);
+  }
+  
+  public void setUp()
+  {
+    super.setUp();
+  }
+  
+  public void tearDown()
+  {
+    super.tearDown();
+  }
+  
+  public static Test suite()
+  {
+    return new TestSuite(CoreSelectBooleanCheckboxTest.class);
   }
 
   protected final UIXEditableValue createEditableValue()

Modified: incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CorePanelBorderTest.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CorePanelBorderTest.java?rev=421025&r1=421024&r2=421025&view=diff
==============================================================================
--- incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CorePanelBorderTest.java (original)
+++ incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CorePanelBorderTest.java Tue Jul 11 16:29:16 2006
@@ -15,6 +15,8 @@
  */
 package org.apache.myfaces.adf.component.core.layout;
 
+import junit.framework.Test;
+import junit.framework.TestSuite;
 import junit.textui.TestRunner;
 
 import org.apache.myfaces.adf.component.UIXPanel;
@@ -35,6 +37,21 @@
     String testName)
   {
     super(testName);
+  }
+  
+  public void setUp()
+  {
+    super.setUp();
+  }
+  
+  public void tearDown()
+  {
+    super.tearDown();
+  }
+  
+  public static Test suite()
+  {
+    return new TestSuite(CorePanelBorderTest.class);
   }
 
   /**

Modified: incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CorePanelBoxTest.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CorePanelBoxTest.java?rev=421025&r1=421024&r2=421025&view=diff
==============================================================================
--- incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CorePanelBoxTest.java (original)
+++ incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CorePanelBoxTest.java Tue Jul 11 16:29:16 2006
@@ -15,6 +15,8 @@
  */
 package org.apache.myfaces.adf.component.core.layout;
 
+import junit.framework.Test;
+import junit.framework.TestSuite;
 import junit.textui.TestRunner;
 import org.apache.myfaces.adf.component.UIXPanel;
 
@@ -34,6 +36,21 @@
     String testName)
   {
     super(testName);
+  }
+  
+  public void setUp()
+  {
+    super.setUp();
+  }
+  
+  public void tearDown()
+  {
+    super.tearDown();
+  }
+  
+  public static Test suite()
+  {
+    return new TestSuite(CorePanelBoxTest.class);
   }
 
   /**

Modified: incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CorePanelGroupTest.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CorePanelGroupTest.java?rev=421025&r1=421024&r2=421025&view=diff
==============================================================================
--- incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CorePanelGroupTest.java (original)
+++ incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CorePanelGroupTest.java Tue Jul 11 16:29:16 2006
@@ -15,6 +15,9 @@
  */
 package org.apache.myfaces.adf.component.core.layout;
 
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
 import org.apache.myfaces.adf.component.UIXPanel;
 
 /**
@@ -33,6 +36,21 @@
     String testName)
   {
     super(testName);
+  }
+  
+  public void setUp()
+  {
+    super.setUp();
+  }
+  
+  public void tearDown()
+  {
+    super.tearDown();
+  }
+  
+  public static Test suite()
+  {
+    return new TestSuite(CorePanelGroupTest.class);
   }
 
   /**

Modified: incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CorePanelHeaderTest.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CorePanelHeaderTest.java?rev=421025&r1=421024&r2=421025&view=diff
==============================================================================
--- incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CorePanelHeaderTest.java (original)
+++ incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CorePanelHeaderTest.java Tue Jul 11 16:29:16 2006
@@ -15,6 +15,9 @@
  */
 package org.apache.myfaces.adf.component.core.layout;
 
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
 import org.apache.myfaces.adf.component.UIXPanel;
 
 /**
@@ -33,6 +36,21 @@
     String testName)
   {
     super(testName);
+  }
+  
+  public void setUp()
+  {
+    super.setUp();
+  }
+  
+  public void tearDown()
+  {
+    super.tearDown();
+  }
+  
+  public static Test suite()
+  {
+    return new TestSuite(CorePanelHeaderTest.class);
   }
 
   /**

Modified: incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CorePanelListTest.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CorePanelListTest.java?rev=421025&r1=421024&r2=421025&view=diff
==============================================================================
--- incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CorePanelListTest.java (original)
+++ incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CorePanelListTest.java Tue Jul 11 16:29:16 2006
@@ -15,6 +15,9 @@
  */
 package org.apache.myfaces.adf.component.core.layout;
 
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
 import org.apache.myfaces.adf.component.UIXPanel;
 
 /**
@@ -33,6 +36,21 @@
     String testName)
   {
     super(testName);
+  }
+  
+  public void setUp()
+  {
+    super.setUp();
+  }
+  
+  public void tearDown()
+  {
+    super.tearDown();
+  }
+  
+  public static Test suite()
+  {
+    return new TestSuite(CorePanelListTest.class);
   }
 
   /**

Modified: incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CorePanelSideBarTest.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CorePanelSideBarTest.java?rev=421025&r1=421024&r2=421025&view=diff
==============================================================================
--- incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CorePanelSideBarTest.java (original)
+++ incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CorePanelSideBarTest.java Tue Jul 11 16:29:16 2006
@@ -15,6 +15,9 @@
  */
 package org.apache.myfaces.adf.component.core.layout;
 
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
 import org.apache.myfaces.adf.component.UIXPanel;
 
 /**
@@ -33,6 +36,21 @@
     String testName)
   {
     super(testName);
+  }
+  
+  public void setUp()
+  {
+    super.setUp();
+  }
+  
+  public void tearDown()
+  {
+    super.tearDown();
+  }
+  
+  public static Test suite()
+  {
+    return new TestSuite(CorePanelSideBarTest.class);
   }
 
   /**

Modified: incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CoreShowDetailHeaderTest.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CoreShowDetailHeaderTest.java?rev=421025&r1=421024&r2=421025&view=diff
==============================================================================
--- incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CoreShowDetailHeaderTest.java (original)
+++ incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CoreShowDetailHeaderTest.java Tue Jul 11 16:29:16 2006
@@ -15,6 +15,9 @@
  */
 package org.apache.myfaces.adf.component.core.layout;
 
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
 import org.apache.myfaces.adf.component.UIXShowDetail;
 import org.apache.myfaces.adf.component.UIXShowDetailTest;
 
@@ -34,6 +37,21 @@
     String testName)
   {
     super(testName);
+  }
+  
+  public void setUp()
+  {
+    super.setUp();
+  }
+  
+  public void tearDown()
+  {
+    super.tearDown();
+  }
+  
+  public static Test suite()
+  {
+    return new TestSuite(CoreShowDetailHeaderTest.class);
   }
 
   protected UIXShowDetail createHideShow()

Modified: incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CoreShowDetailTest.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CoreShowDetailTest.java?rev=421025&r1=421024&r2=421025&view=diff
==============================================================================
--- incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CoreShowDetailTest.java (original)
+++ incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CoreShowDetailTest.java Tue Jul 11 16:29:16 2006
@@ -15,6 +15,9 @@
  */
 package org.apache.myfaces.adf.component.core.layout;
 
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
 import org.apache.myfaces.adf.component.UIXShowDetail;
 import org.apache.myfaces.adf.component.UIXShowDetailTest;
 
@@ -34,6 +37,21 @@
     String testName)
   {
     super(testName);
+  }
+  
+  public void setUp()
+  {
+    super.setUp();
+  }
+  
+  public void tearDown()
+  {
+    super.tearDown();
+  }
+  
+  public static Test suite()
+  {
+    return new TestSuite(CoreShowDetailTest.class);
   }
 
 

Modified: incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CoreShowManyAccordionTest.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CoreShowManyAccordionTest.java?rev=421025&r1=421024&r2=421025&view=diff
==============================================================================
--- incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CoreShowManyAccordionTest.java (original)
+++ incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CoreShowManyAccordionTest.java Tue Jul 11 16:29:16 2006
@@ -16,6 +16,10 @@
 package org.apache.myfaces.adf.component.core.layout;
 
 import java.io.IOException;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
 import org.apache.myfaces.adf.component.UIComponentTestCase;
 
 /**
@@ -34,6 +38,21 @@
   public CoreShowManyAccordionTest(String testName)
   {
     super(testName);
+  }
+  
+  public void setUp()
+  {
+    super.setUp();
+  }
+  
+  public void tearDown()
+  {
+    super.tearDown();
+  }
+  
+  public static Test suite()
+  {
+    return new TestSuite(CoreShowManyAccordionTest.class);
   }
 
   /**

Modified: incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CoreShowOneAccordionTest.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CoreShowOneAccordionTest.java?rev=421025&r1=421024&r2=421025&view=diff
==============================================================================
--- incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CoreShowOneAccordionTest.java (original)
+++ incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CoreShowOneAccordionTest.java Tue Jul 11 16:29:16 2006
@@ -16,6 +16,10 @@
 package org.apache.myfaces.adf.component.core.layout;
 
 import java.io.IOException;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
 import org.apache.myfaces.adf.component.UIComponentTestCase;
 
 /**
@@ -34,6 +38,21 @@
   public CoreShowOneAccordionTest(String testName)
   {
     super(testName);
+  }
+  
+  public void setUp()
+  {
+    super.setUp();
+  }
+  
+  public void tearDown()
+  {
+    super.tearDown();
+  }
+  
+  public static Test suite()
+  {
+    return new TestSuite(CoreShowOneAccordionTest.class);
   }
 
   /**

Modified: incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CoreShowOneChoiceTest.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CoreShowOneChoiceTest.java?rev=421025&r1=421024&r2=421025&view=diff
==============================================================================
--- incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CoreShowOneChoiceTest.java (original)
+++ incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CoreShowOneChoiceTest.java Tue Jul 11 16:29:16 2006
@@ -16,6 +16,10 @@
 package org.apache.myfaces.adf.component.core.layout;
 
 import java.io.IOException;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
 import org.apache.myfaces.adf.component.UIComponentTestCase;
 
 /**
@@ -35,6 +39,21 @@
    public CoreShowOneChoiceTest(String testName)
    {
      super(testName);
+   }
+   
+   public void setUp()
+   {
+     super.setUp();
+   }
+   
+   public void tearDown()
+   {
+     super.tearDown();
+   }
+   
+   public static Test suite()
+   {
+     return new TestSuite(CoreShowOneChoiceTest.class);
    }
 
   /**

Modified: incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CoreShowOneRadioTest.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CoreShowOneRadioTest.java?rev=421025&r1=421024&r2=421025&view=diff
==============================================================================
--- incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CoreShowOneRadioTest.java (original)
+++ incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/layout/CoreShowOneRadioTest.java Tue Jul 11 16:29:16 2006
@@ -16,6 +16,10 @@
 package org.apache.myfaces.adf.component.core.layout;
 
 import java.io.IOException;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
 import org.apache.myfaces.adf.component.UIComponentTestCase;
 
 /**
@@ -35,6 +39,21 @@
    public CoreShowOneRadioTest(String testName)
    {
      super(testName);
+   }
+   
+   public void setUp()
+   {
+     super.setUp();
+   }
+   
+   public void tearDown()
+   {
+     super.tearDown();
+   }
+   
+   public static Test suite()
+   {
+     return new TestSuite(CoreShowOneRadioTest.class);
    }
 
   /**

Modified: incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/nav/CoreMenuChoiceTest.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/nav/CoreMenuChoiceTest.java?rev=421025&r1=421024&r2=421025&view=diff
==============================================================================
--- incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/nav/CoreMenuChoiceTest.java (original)
+++ incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/nav/CoreMenuChoiceTest.java Tue Jul 11 16:29:16 2006
@@ -17,6 +17,9 @@
 
 import java.io.IOException;
 
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
 import org.apache.myfaces.adf.component.UIComponentTestCase;
 
 /**
@@ -35,6 +38,21 @@
     String testName)
   {
     super(testName);
+  }
+  
+  public void setUp()
+  {
+    super.setUp();
+  }
+  
+  public void tearDown()
+  {
+    super.tearDown();
+  }
+  
+  public static Test suite()
+  {
+    return new TestSuite(CoreMenuChoiceTest.class);
   }
 
   /**

Modified: incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/nav/CoreNavigationPathTest.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/nav/CoreNavigationPathTest.java?rev=421025&r1=421024&r2=421025&view=diff
==============================================================================
--- incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/nav/CoreNavigationPathTest.java (original)
+++ incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/nav/CoreNavigationPathTest.java Tue Jul 11 16:29:16 2006
@@ -17,6 +17,9 @@
 
 import java.io.IOException;
 
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
 import org.apache.myfaces.adf.component.UIComponentTestCase;
 
 /**
@@ -35,6 +38,21 @@
     String testName)
   {
     super(testName);
+  }
+  
+  public void setUp()
+  {
+    super.setUp();
+  }
+  
+  public void tearDown()
+  {
+    super.tearDown();
+  }
+  
+  public static Test suite()
+  {
+    return new TestSuite(CoreNavigationPathTest.class);
   }
   
   /**

Modified: incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/nav/CoreProcessTrainTest.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/nav/CoreProcessTrainTest.java?rev=421025&r1=421024&r2=421025&view=diff
==============================================================================
--- incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/nav/CoreProcessTrainTest.java (original)
+++ incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/nav/CoreProcessTrainTest.java Tue Jul 11 16:29:16 2006
@@ -15,6 +15,8 @@
  */
 package org.apache.myfaces.adf.component.core.nav;
 
+import junit.framework.Test;
+import junit.framework.TestSuite;
 import junit.textui.TestRunner;
 
 import org.apache.myfaces.adf.component.UIComponentTestCase;
@@ -36,6 +38,21 @@
     String testName)
   {
     super(testName);
+  }
+  
+  public void setUp()
+  {
+    super.setUp();
+  }
+  
+  public void tearDown()
+  {
+    super.tearDown();
+  }
+  
+  public static Test suite()
+  {
+    return new TestSuite(CoreProcessTrainTest.class);
   }
 
   /**

Modified: incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/output/CoreObjectSeparatorTest.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/output/CoreObjectSeparatorTest.java?rev=421025&r1=421024&r2=421025&view=diff
==============================================================================
--- incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/output/CoreObjectSeparatorTest.java (original)
+++ incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/output/CoreObjectSeparatorTest.java Tue Jul 11 16:29:16 2006
@@ -15,6 +15,8 @@
  */
 package org.apache.myfaces.adf.component.core.output;
 
+import junit.framework.Test;
+import junit.framework.TestSuite;
 import junit.textui.TestRunner;
 
 import org.apache.myfaces.adf.component.UIXObject;
@@ -37,6 +39,21 @@
     super(testName);
   }
 
+  public void setUp()
+  {
+    super.setUp();
+  }
+  
+  public void tearDown()
+  {
+    super.tearDown();
+  }
+  
+  public static Test suite()
+  {
+    return new TestSuite(CoreObjectSeparatorTest.class);
+  }
+  
   /**
    * Tests the initial values for the component attributes.
    */

Modified: incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/output/CoreObjectSpacerTest.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/output/CoreObjectSpacerTest.java?rev=421025&r1=421024&r2=421025&view=diff
==============================================================================
--- incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/output/CoreObjectSpacerTest.java (original)
+++ incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/output/CoreObjectSpacerTest.java Tue Jul 11 16:29:16 2006
@@ -15,6 +15,9 @@
  */
 package org.apache.myfaces.adf.component.core.output;
 
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
 import org.apache.myfaces.adf.component.UIXObject;
 
 /**
@@ -33,6 +36,21 @@
     String testName)
   {
     super(testName);
+  }
+  
+  public void setUp()
+  {
+    super.setUp();
+  }
+  
+  public void tearDown()
+  {
+    super.tearDown();
+  }
+  
+  public static Test suite()
+  {
+    return new TestSuite(CoreObjectSpacerTest.class);
   }
 
   /**

Modified: incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/output/CoreOutputTextTest.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/output/CoreOutputTextTest.java?rev=421025&r1=421024&r2=421025&view=diff
==============================================================================
--- incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/output/CoreOutputTextTest.java (original)
+++ incubator/adffaces/branches/matzew-mock-overhaul/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/output/CoreOutputTextTest.java Tue Jul 11 16:29:16 2006
@@ -17,6 +17,9 @@
 
 import java.io.IOException;
 
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
 import org.apache.myfaces.adf.component.UIComponentTestCase;
 
 /**
@@ -35,6 +38,21 @@
     String testName)
   {
     super(testName);
+  }
+  
+  public void setUp()
+  {
+    super.setUp();
+  }
+  
+  public void tearDown()
+  {
+    super.tearDown();
+  }
+  
+  public static Test suite()
+  {
+    return new TestSuite(CoreOutputTextTest.class);
   }
 
   /**



Mime
View raw message