You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by jk...@apache.org on 2006/06/27 20:56:40 UTC
svn commit: r417554 [2/3] - in
/tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry: binding/
callback/ coerce/ components/ describe/ dojo/form/ engine/ engine/encoders/
engine/state/ enhance/ error/ event/ form/ form/translator/ form/valid...
Modified: tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/InjectAssetWorkerTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/InjectAssetWorkerTest.java?rev=417554&r1=417553&r2=417554&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/InjectAssetWorkerTest.java (original)
+++ tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/InjectAssetWorkerTest.java Tue Jun 27 11:56:34 2006
@@ -31,6 +31,7 @@
import org.apache.tapestry.spec.AssetSpecification;
import org.apache.tapestry.spec.IAssetSpecification;
import org.apache.tapestry.spec.IComponentSpecification;
+import org.testng.annotations.Test;
/**
* Tests for {@link org.apache.tapestry.enhance.InjectAssetWorker}.
@@ -38,6 +39,7 @@
* @author Howard M. Lewis Ship
* @since 4.0
*/
+@Test
public class InjectAssetWorkerTest extends BaseEnhancementTestCase
{
private IComponentSpecification newSpec(String assetName, String propertyName, Location location)
@@ -100,7 +102,7 @@
IComponentSpecification spec = newSpec("fred", "barney", l);
- ErrorLog log = (ErrorLog) newMock(ErrorLog.class);
+ ErrorLog log = newMock(ErrorLog.class);
trainGetPropertyType(op, "barney", IComponent.class);
@@ -148,4 +150,4 @@
verify();
}
-}
\ No newline at end of file
+}
Modified: tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/InjectStateFlagWorkerTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/InjectStateFlagWorkerTest.java?rev=417554&r1=417553&r2=417554&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/InjectStateFlagWorkerTest.java (original)
+++ tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/InjectStateFlagWorkerTest.java Tue Jun 27 11:56:34 2006
@@ -25,6 +25,7 @@
import org.apache.tapestry.engine.state.ApplicationStateManager;
import org.apache.tapestry.spec.InjectSpecification;
import org.apache.tapestry.spec.InjectSpecificationImpl;
+import org.testng.annotations.Test;
/**
* Tests for {@link org.apache.tapestry.enhance.InjectStateFlagWorker}.
@@ -32,6 +33,7 @@
* @author Howard M. Lewis Ship
* @since 4.0
*/
+@Test
public class InjectStateFlagWorkerTest extends BaseEnhancementTestCase
{
public void testNoExistingProperty()
Modified: tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestAbstractPropertyWorker.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestAbstractPropertyWorker.java?rev=417554&r1=417553&r2=417554&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestAbstractPropertyWorker.java (original)
+++ tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestAbstractPropertyWorker.java Tue Jun 27 11:56:34 2006
@@ -27,6 +27,7 @@
import org.apache.tapestry.IComponent;
import org.apache.tapestry.event.PageDetachListener;
import org.apache.tapestry.spec.IComponentSpecification;
+import org.testng.annotations.Test;
/**
* Tests {@link org.apache.tapestry.enhance.AbstractPropertyWorker}.
@@ -34,6 +35,7 @@
* @author Howard M. Lewis Ship
* @since 4.0
*/
+@Test
public class TestAbstractPropertyWorker extends BaseEnhancementTestCase
{
@@ -88,7 +90,7 @@
Location l = fabricateLocation(21);
- ErrorLog log = (ErrorLog) newMock(ErrorLog.class);
+ ErrorLog log = newMock(ErrorLog.class);
expect(op.findUnclaimedAbstractProperties()).andReturn(Collections.singletonList("fred"));
Throwable ex = new ApplicationRuntimeException("Arbitrary error.");
@@ -110,4 +112,4 @@
verify();
}
-}
\ No newline at end of file
+}
Modified: tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestAutowireWorker.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestAutowireWorker.java?rev=417554&r1=417553&r2=417554&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestAutowireWorker.java (original)
+++ tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestAutowireWorker.java Tue Jun 27 11:56:34 2006
@@ -23,6 +23,7 @@
import org.apache.hivemind.impl.RegistryBuilder;
import org.apache.hivemind.service.MethodSignature;
import org.apache.tapestry.spec.IComponentSpecification;
+import org.testng.annotations.Test;
/**
@@ -30,6 +31,7 @@
* @author James Carman
*
*/
+@Test
public class TestAutowireWorker extends BaseEnhancementTestCase
{
@@ -49,7 +51,7 @@
{
final Registry registry = buildFrameworkRegistry("autowire-single.xml" );
Location l = newLocation();
- EnhancementOperation op = (EnhancementOperation) newMock(EnhancementOperation.class);
+ EnhancementOperation op = newMock(EnhancementOperation.class);
expect(op.findUnclaimedAbstractProperties())
.andReturn(Collections.singletonList( HELLO_SERVICE_PROPERTY ));
@@ -58,7 +60,7 @@
expect(op.canClaimAsReadOnlyProperty(HELLO_SERVICE_PROPERTY)).andReturn(true);
- IComponentSpecification spec = ( IComponentSpecification )newMock(IComponentSpecification.class);
+ IComponentSpecification spec = newMock(IComponentSpecification.class);
expect(spec.getLocation()).andReturn(l);
@@ -85,7 +87,7 @@
private void assertNotAutowired( Registry registry )
{
- EnhancementOperation op = (EnhancementOperation)newMock(EnhancementOperation.class);
+ EnhancementOperation op = newMock(EnhancementOperation.class);
expect(op.findUnclaimedAbstractProperties())
.andReturn(Collections.singletonList( HELLO_SERVICE_PROPERTY ));
Modified: tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestDeferredScript.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestDeferredScript.java?rev=417554&r1=417553&r2=417554&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestDeferredScript.java (original)
+++ tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestDeferredScript.java Tue Jun 27 11:56:34 2006
@@ -25,6 +25,7 @@
import org.apache.tapestry.BaseComponentTestCase;
import org.apache.tapestry.IScript;
import org.apache.tapestry.engine.IScriptSource;
+import org.testng.annotations.Test;
/**
* Tests for {@link org.apache.tapestry.enhance.DeferredScriptImpl}.
@@ -32,14 +33,15 @@
* @author Howard M. Lewis Ship
* @since 4.0
*/
+@Test
public class TestDeferredScript extends BaseComponentTestCase
{
public void testSuccess()
{
IScriptSource source = newMock(IScriptSource.class);
- Resource r = (Resource) newMock(Resource.class);
- IScript script = (IScript) newMock(IScript.class);
+ Resource r = newMock(Resource.class);
+ IScript script = newMock(IScript.class);
expect(source.getScript(r)).andReturn(script);
@@ -61,7 +63,7 @@
{
IScriptSource source = newMock(IScriptSource.class);
- Resource newResource = (Resource) newMock(Resource.class);
+ Resource newResource = newMock(Resource.class);
Resource r = newResource;
Location l = newLocation();
Modified: tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestDispatchToInjectWorker.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestDispatchToInjectWorker.java?rev=417554&r1=417553&r2=417554&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestDispatchToInjectWorker.java (original)
+++ tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestDispatchToInjectWorker.java Tue Jun 27 11:56:34 2006
@@ -27,6 +27,7 @@
import org.apache.tapestry.spec.IComponentSpecification;
import org.apache.tapestry.spec.InjectSpecification;
import org.apache.tapestry.spec.InjectSpecificationImpl;
+import org.testng.annotations.Test;
/**
* Tests for {@link org.apache.tapestry.enhance.DispatchToInjectWorker}.
@@ -34,6 +35,7 @@
* @author Howard M. Lewis Ship
* @since 4.0
*/
+@Test
public class TestDispatchToInjectWorker extends BaseComponentTestCase
{
private InjectSpecification newInjectSpecification(String propertyName, String type,
Modified: tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestEnhanceUtils.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestEnhanceUtils.java?rev=417554&r1=417553&r2=417554&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestEnhanceUtils.java (original)
+++ tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestEnhanceUtils.java Tue Jun 27 11:56:34 2006
@@ -24,11 +24,13 @@
import org.apache.tapestry.IBinding;
import org.apache.tapestry.IComponent;
import org.apache.tapestry.IRender;
+import org.testng.annotations.Test;
/**
* @author Howard M. Lewis Ship
* @since 4.0
*/
+@Test
public class TestEnhanceUtils extends BaseComponentTestCase
{
protected EnhancementOperation newOp()
Modified: tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestEnhancementOperation.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestEnhancementOperation.java?rev=417554&r1=417553&r2=417554&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestEnhancementOperation.java (original)
+++ tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestEnhancementOperation.java Tue Jun 27 11:56:34 2006
@@ -48,6 +48,7 @@
import org.apache.tapestry.services.ComponentConstructor;
import org.apache.tapestry.spec.IComponentSpecification;
import org.testng.annotations.Configuration;
+import org.testng.annotations.Test;
/**
* Tests for {@link org.apache.tapestry.enhance.EnhancementOperationImpl}.
@@ -55,6 +56,7 @@
* @author Howard M. Lewis Ship
* @since 4.0
*/
+@Test
public class TestEnhancementOperation extends BaseComponentTestCase
{
@Configuration(beforeTestClass = true)
@@ -221,7 +223,7 @@
private ClassFab newClassFab()
{
- return (ClassFab) newMock(ClassFab.class);
+ return newMock(ClassFab.class);
}
public void testConstructorAndAccessors()
@@ -675,7 +677,7 @@
public void testFindUnclaimedAbstractProperties()
{
- ClassResolver cr = (ClassResolver) newMock(ClassResolver.class);
+ ClassResolver cr = newMock(ClassResolver.class);
IComponentSpecification spec = newSpec();
ClassFactory cf = newClassFactory(UnclaimedAbstractPropertiesFixture.class);
Modified: tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestInjectBeanWorker.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestInjectBeanWorker.java?rev=417554&r1=417553&r2=417554&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestInjectBeanWorker.java (original)
+++ tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestInjectBeanWorker.java Tue Jun 27 11:56:34 2006
@@ -30,6 +30,7 @@
import org.apache.tapestry.spec.BeanSpecification;
import org.apache.tapestry.spec.IBeanSpecification;
import org.apache.tapestry.spec.IComponentSpecification;
+import org.testng.annotations.Test;
/**
* Tests for {@link org.apache.tapestry.enhance.InjectBeanWorker}.
@@ -37,6 +38,7 @@
* @author Howard M. Lewis Ship
* @since 4.0
*/
+@Test
public class TestInjectBeanWorker extends BaseComponentTestCase
{
private IComponentSpecification newSpec(String beanName, String propertyName, Location location)
Modified: tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestInjectComponentWorker.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestInjectComponentWorker.java?rev=417554&r1=417553&r2=417554&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestInjectComponentWorker.java (original)
+++ tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestInjectComponentWorker.java Tue Jun 27 11:56:34 2006
@@ -30,6 +30,7 @@
import org.apache.tapestry.spec.ContainedComponent;
import org.apache.tapestry.spec.IComponentSpecification;
import org.apache.tapestry.spec.IContainedComponent;
+import org.testng.annotations.Test;
/**
* Tests for {@link org.apache.tapestry.enhance.InjectComponentWorker}.
@@ -37,6 +38,7 @@
* @author Howard M. Lewis Ship
* @since 4.0
*/
+@Test
public class TestInjectComponentWorker extends BaseComponentTestCase
{
private IComponentSpecification newSpec(String componentId, String propertyName,
@@ -69,7 +71,7 @@
protected EnhancementOperation newEnhancementOperation()
{
- return (EnhancementOperation) newMock(EnhancementOperation.class);
+ return newMock(EnhancementOperation.class);
}
protected void trainGetPropertyType(EnhancementOperation op, String propertyName,
@@ -141,7 +143,7 @@
IComponentSpecification spec = newSpec("fred", "barney", l);
- ErrorLog log = (ErrorLog) newMock(ErrorLog.class);
+ ErrorLog log = newMock(ErrorLog.class);
expect(op.getPropertyType("barney")).andReturn(IComponent.class);
Modified: tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestInjectEventInvokerWorker.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestInjectEventInvokerWorker.java?rev=417554&r1=417553&r2=417554&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestInjectEventInvokerWorker.java (original)
+++ tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestInjectEventInvokerWorker.java Tue Jun 27 11:56:34 2006
@@ -25,6 +25,7 @@
import org.apache.tapestry.BaseComponent;
import org.apache.tapestry.services.impl.ComponentEventInvoker;
import org.apache.tapestry.spec.IComponentSpecification;
+import org.testng.annotations.Test;
/**
@@ -32,6 +33,7 @@
*
* @author jkuhnert
*/
+@Test
public class TestInjectEventInvokerWorker extends BaseEnhancementTestCase
{
@@ -70,7 +72,7 @@
EnhancementOperation op = newOp();
ComponentEventInvoker invoker = new ComponentEventInvoker();
- ErrorLog log = (ErrorLog) newMock(ErrorLog.class);
+ ErrorLog log = newMock(ErrorLog.class);
Throwable ex = new ApplicationRuntimeException(EnhanceMessages
.claimedProperty("eventInvoker"));
Modified: tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestInjectListenerRegistrationWorker.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestInjectListenerRegistrationWorker.java?rev=417554&r1=417553&r2=417554&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestInjectListenerRegistrationWorker.java (original)
+++ tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestInjectListenerRegistrationWorker.java Tue Jun 27 11:56:34 2006
@@ -19,6 +19,7 @@
import org.apache.tapestry.BaseComponentTestCase;
import org.apache.tapestry.IComponent;
import org.apache.tapestry.spec.IComponentSpecification;
+import org.testng.annotations.Test;
/**
* Tests for {@link TestInjectListenerRegistrationWorker}.
@@ -26,6 +27,7 @@
* @author Howard M. Lewis Ship
* @since 4.0
*/
+@Test
public class TestInjectListenerRegistrationWorker extends BaseComponentTestCase
{
Modified: tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestInjectMessagesWorker.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestInjectMessagesWorker.java?rev=417554&r1=417553&r2=417554&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestInjectMessagesWorker.java (original)
+++ tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestInjectMessagesWorker.java Tue Jun 27 11:56:34 2006
@@ -27,6 +27,7 @@
import org.apache.tapestry.BaseComponent;
import org.apache.tapestry.services.ComponentMessagesSource;
import org.apache.tapestry.spec.IComponentSpecification;
+import org.testng.annotations.Test;
/**
* Tests for {@link org.apache.tapestry.enhance.InjectMessagesWorker}.
@@ -34,11 +35,12 @@
* @author Howard M. Lewis Ship
* @since 4.0
*/
+@Test
public class TestInjectMessagesWorker extends BaseEnhancementTestCase
{
private ComponentMessagesSource newSource()
{
- return (ComponentMessagesSource) newMock(ComponentMessagesSource.class);
+ return newMock(ComponentMessagesSource.class);
}
public void testSuccess()
@@ -89,7 +91,7 @@
expect(op.getBaseClass()).andReturn(BaseComponent.class);
- ErrorLog log = (ErrorLog) newMock(ErrorLog.class);
+ ErrorLog log = newMock(ErrorLog.class);
log.error(
EnhanceMessages.errorAddingProperty(w._messagesProperty, BaseComponent.class, ex),
Modified: tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestInjectMetaWorker.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestInjectMetaWorker.java?rev=417554&r1=417553&r2=417554&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestInjectMetaWorker.java (original)
+++ tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestInjectMetaWorker.java Tue Jun 27 11:56:34 2006
@@ -26,6 +26,7 @@
import org.apache.tapestry.services.ComponentPropertySource;
import org.apache.tapestry.spec.InjectSpecification;
import org.apache.tapestry.spec.InjectSpecificationImpl;
+import org.testng.annotations.Test;
/**
* Tests for {@link org.apache.tapestry.enhance.InjectMetaWorker}.
@@ -33,6 +34,7 @@
* @author Howard M. Lewis Ship
* @since 4.0
*/
+@Test
public class TestInjectMetaWorker extends BaseComponentTestCase
{
private InjectSpecification newSpec(String propertyName, String object, Location location)
@@ -48,7 +50,7 @@
private ComponentPropertySource newSource()
{
- return (ComponentPropertySource) newMock(ComponentPropertySource.class);
+ return newMock(ComponentPropertySource.class);
}
public void testPrimitive()
@@ -135,7 +137,7 @@
InjectSpecification spec = newSpec("fooBar", "foo.bar", l);
ComponentPropertySource source = newSource();
- ValueConverter converter = (ValueConverter) newMock(ValueConverter.class);
+ ValueConverter converter = newMock(ValueConverter.class);
EnhancementOperation op = newMock(EnhancementOperation.class);
Modified: tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestInjectObjectWorker.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestInjectObjectWorker.java?rev=417554&r1=417553&r2=417554&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestInjectObjectWorker.java (original)
+++ tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestInjectObjectWorker.java Tue Jun 27 11:56:34 2006
@@ -29,6 +29,7 @@
import org.apache.tapestry.services.InjectedValueProvider;
import org.apache.tapestry.spec.InjectSpecification;
import org.apache.tapestry.spec.InjectSpecificationImpl;
+import org.testng.annotations.Test;
/**
* Tests for {@link org.apache.tapestry.enhance.InjectObjectWorker}.
@@ -36,6 +37,7 @@
* @author Howard M. Lewis Ship
* @since 4.0
*/
+@Test
public class TestInjectObjectWorker extends BaseComponentTestCase
{
private InjectSpecification newSpec(String name, String locator, Location location)
Modified: tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestInjectPageWorker.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestInjectPageWorker.java?rev=417554&r1=417553&r2=417554&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestInjectPageWorker.java (original)
+++ tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestInjectPageWorker.java Tue Jun 27 11:56:34 2006
@@ -27,6 +27,7 @@
import org.apache.tapestry.html.BasePage;
import org.apache.tapestry.spec.InjectSpecification;
import org.apache.tapestry.spec.InjectSpecificationImpl;
+import org.testng.annotations.Test;
/**
* Tests for {@link org.apache.tapestry.enhance.InjectPageWorker}.
@@ -34,6 +35,7 @@
* @author Howard Lewis Ship
* @since 4.0
*/
+@Test
public class TestInjectPageWorker extends BaseComponentTestCase
{
public void testPrimitivePropertyType()
Modified: tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestInjectScriptWorker.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestInjectScriptWorker.java?rev=417554&r1=417553&r2=417554&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestInjectScriptWorker.java (original)
+++ tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestInjectScriptWorker.java Tue Jun 27 11:56:34 2006
@@ -25,6 +25,7 @@
import org.apache.tapestry.IScript;
import org.apache.tapestry.engine.IScriptSource;
import org.apache.tapestry.spec.InjectSpecificationImpl;
+import org.testng.annotations.Test;
/**
* Tests for {@link org.apache.tapestry.enhance.InjectScriptWorker}.
@@ -32,6 +33,7 @@
* @author Howard M. Lewis Ship
* @since 4.0
*/
+@Test
public class TestInjectScriptWorker extends BaseComponentTestCase
{
public void testSuccess()
@@ -44,7 +46,7 @@
final Location injectSpecLocation = newLocation();
- final IScriptSource source = (IScriptSource) newMock(IScriptSource.class);
+ final IScriptSource source = newMock(IScriptSource.class);
op.claimReadonlyProperty("foo");
Modified: tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestInjectSpecificationWorker.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestInjectSpecificationWorker.java?rev=417554&r1=417553&r2=417554&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestInjectSpecificationWorker.java (original)
+++ tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestInjectSpecificationWorker.java Tue Jun 27 11:56:34 2006
@@ -25,6 +25,7 @@
import org.apache.hivemind.service.MethodSignature;
import org.apache.tapestry.BaseComponent;
import org.apache.tapestry.spec.IComponentSpecification;
+import org.testng.annotations.Test;
/**
* Tests for {@link org.apache.tapestry.enhance.InjectSpecificationWorker}.
@@ -32,6 +33,7 @@
* @author Howard M. Lewis Ship
* @since 4.0
*/
+@Test
public class TestInjectSpecificationWorker extends BaseEnhancementTestCase
{
@@ -65,7 +67,7 @@
Location l = newLocation();
EnhancementOperation op = newOp();
- ErrorLog log = (ErrorLog) newMock(ErrorLog.class);
+ ErrorLog log = newMock(ErrorLog.class);
Throwable ex = new ApplicationRuntimeException(EnhanceMessages
.claimedProperty("specification"));
Modified: tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestInjectStateWorker.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestInjectStateWorker.java?rev=417554&r1=417553&r2=417554&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestInjectStateWorker.java (original)
+++ tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestInjectStateWorker.java Tue Jun 27 11:56:34 2006
@@ -27,6 +27,7 @@
import org.apache.tapestry.event.PageDetachListener;
import org.apache.tapestry.spec.InjectSpecification;
import org.apache.tapestry.spec.InjectSpecificationImpl;
+import org.testng.annotations.Test;
/**
* Tests for {@link org.apache.tapestry.enhance.InjectStateWorker}.
@@ -34,11 +35,12 @@
* @author Howard M. Lewis Ship
* @since 4.0
*/
+@Test
public class TestInjectStateWorker extends BaseComponentTestCase
{
private ApplicationStateManager newASM()
{
- return (ApplicationStateManager) newMock(ApplicationStateManager.class);
+ return newMock(ApplicationStateManager.class);
}
private InjectSpecification newSpec(String propertyName, String objectName, Location l)
Modified: tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestParameterPropertyWorker.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestParameterPropertyWorker.java?rev=417554&r1=417553&r2=417554&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestParameterPropertyWorker.java (original)
+++ tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestParameterPropertyWorker.java Tue Jun 27 11:56:34 2006
@@ -30,12 +30,14 @@
import org.apache.tapestry.spec.IComponentSpecification;
import org.apache.tapestry.spec.IParameterSpecification;
import org.apache.tapestry.spec.ParameterSpecification;
+import org.testng.annotations.Test;
/**
* Tests for {@link org.apache.tapestry.enhance.ParameterPropertyWorker}.
*
* @author Howard M. Lewis Ship
*/
+@Test
public class TestParameterPropertyWorker extends BaseComponentTestCase
{
@@ -111,7 +113,7 @@
null,
null));
- EnhancementOperation op = (EnhancementOperation) newMock(EnhancementOperation.class);
+ EnhancementOperation op = newMock(EnhancementOperation.class);
replay();
Modified: tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestSpecifiedPropertyWorker.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestSpecifiedPropertyWorker.java?rev=417554&r1=417553&r2=417554&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestSpecifiedPropertyWorker.java (original)
+++ tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/enhance/TestSpecifiedPropertyWorker.java Tue Jun 27 11:56:34 2006
@@ -37,6 +37,7 @@
import org.apache.tapestry.spec.IComponentSpecification;
import org.apache.tapestry.spec.IPropertySpecification;
import org.apache.tapestry.spec.PropertySpecification;
+import org.testng.annotations.Test;
/**
* Tests for {@link org.apache.tapestry.enhance.SpecifiedPropertyWorker}.
@@ -44,6 +45,7 @@
* @author Howard M. Lewis Ship
* @since 4.0
*/
+@Test
public class TestSpecifiedPropertyWorker extends BaseComponentTestCase
{
private List buildPropertySpecs(String name, String type, boolean persistent)
@@ -150,7 +152,7 @@
public void testAddWithInitialValue() throws Exception
{
- BindingSource bs = (BindingSource) newMock(BindingSource.class);
+ BindingSource bs = newMock(BindingSource.class);
Location l = fabricateLocation(12);
IComponentSpecification spec = buildComponentSpecification(buildPropertySpecs(
@@ -287,7 +289,7 @@
expect(op.getBaseClass()).andReturn(BaseComponent.class);
- ErrorLog log = (ErrorLog) newMock(ErrorLog.class);
+ ErrorLog log = newMock(ErrorLog.class);
log
.error(
Modified: tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/error/BaseErrorTestCase.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/error/BaseErrorTestCase.java?rev=417554&r1=417553&r2=417554&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/error/BaseErrorTestCase.java (original)
+++ tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/error/BaseErrorTestCase.java Tue Jun 27 11:56:34 2006
@@ -63,7 +63,7 @@
protected RequestExceptionReporter newReporter()
{
- return (RequestExceptionReporter) newMock(RequestExceptionReporter.class);
+ return newMock(RequestExceptionReporter.class);
}
}
Modified: tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/error/StaleSessionExceptionPresenterTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/error/StaleSessionExceptionPresenterTest.java?rev=417554&r1=417553&r2=417554&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/error/StaleSessionExceptionPresenterTest.java (original)
+++ tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/error/StaleSessionExceptionPresenterTest.java Tue Jun 27 11:56:34 2006
@@ -18,6 +18,7 @@
import org.apache.tapestry.IRequestCycle;
import org.apache.tapestry.StaleSessionException;
import org.apache.tapestry.services.ResponseRenderer;
+import org.testng.annotations.Test;
/**
* Tests for {@link org.apache.tapestry.error.StaleSessionExceptionPresenterImpl}.
@@ -25,6 +26,7 @@
* @author Howard M. Lewis Ship
* @since 4.0
*/
+@Test
public class StaleSessionExceptionPresenterTest extends BaseErrorTestCase
{
public void testSuccess() throws Exception
Modified: tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/error/TestExceptionPresenter.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/error/TestExceptionPresenter.java?rev=417554&r1=417553&r2=417554&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/error/TestExceptionPresenter.java (original)
+++ tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/error/TestExceptionPresenter.java Tue Jun 27 11:56:34 2006
@@ -21,6 +21,7 @@
import org.apache.tapestry.IRequestCycle;
import org.apache.tapestry.html.BasePage;
import org.apache.tapestry.services.ResponseRenderer;
+import org.testng.annotations.Test;
/**
* Tests for {@link org.apache.tapestry.error.ExceptionPresenterImpl}.
@@ -28,6 +29,7 @@
* @author Howard M. Lewis Ship
* @since 4.0
*/
+@Test
public class TestExceptionPresenter extends BaseErrorTestCase
{
public abstract static class ExceptionFixture extends BasePage
Modified: tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/event/ReportStatusEventTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/event/ReportStatusEventTest.java?rev=417554&r1=417553&r2=417554&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/event/ReportStatusEventTest.java (original)
+++ tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/event/ReportStatusEventTest.java Tue Jun 27 11:56:34 2006
@@ -18,6 +18,7 @@
import org.apache.tapestry.BaseComponentTestCase;
import org.apache.tapestry.describe.DescriptionReceiver;
+import org.testng.annotations.Test;
/**
* Tests for {@link org.apache.tapestry.event.ReportStatusEvent}.
@@ -25,11 +26,12 @@
* @author Howard M. Lewis Ship
* @since 4.0
*/
+@Test
public class ReportStatusEventTest extends BaseComponentTestCase
{
protected DescriptionReceiver newReceiver()
{
- return (DescriptionReceiver) newMock(DescriptionReceiver.class);
+ return newMock(DescriptionReceiver.class);
}
public void testConstructor()
Modified: tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/AbstractFormComponentTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/AbstractFormComponentTest.java?rev=417554&r1=417553&r2=417554&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/AbstractFormComponentTest.java (original)
+++ tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/AbstractFormComponentTest.java Tue Jun 27 11:56:34 2006
@@ -17,6 +17,7 @@
import static org.testng.AssertJUnit.assertEquals;
import org.apache.hivemind.util.PropertyUtils;
+import org.testng.annotations.Test;
/**
* Tests for {@link org.apache.tapestry.form.AbstractFormComponent}.
@@ -24,6 +25,7 @@
* @author Howard M. Lewis Ship
* @since 4.0
*/
+@Test
public class AbstractFormComponentTest extends BaseFormComponentTestCase
{
public void testCanTakeFocus()
Modified: tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/BaseFormComponentTestCase.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/BaseFormComponentTestCase.java?rev=417554&r1=417553&r2=417554&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/BaseFormComponentTestCase.java (original)
+++ tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/BaseFormComponentTestCase.java Tue Jun 27 11:56:34 2006
@@ -38,7 +38,7 @@
protected IValidationDelegate newDelegate()
{
- return (IValidationDelegate) newMock(IValidationDelegate.class);
+ return newMock(IValidationDelegate.class);
}
protected void trainIsInError(IValidationDelegate delegate, boolean isInError)
@@ -48,7 +48,7 @@
protected IForm newForm()
{
- return (IForm) newMock(IForm.class);
+ return newMock(IForm.class);
}
protected void trainGetForm(IRequestCycle cycle, IForm form)
@@ -87,16 +87,16 @@
protected IBinding newBinding()
{
- return (IBinding) newMock(IBinding.class);
+ return newMock(IBinding.class);
}
protected IActionListener newListener()
{
- return (IActionListener) newMock(IActionListener.class);
+ return newMock(IActionListener.class);
}
protected IFormComponent newField()
{
- return (IFormComponent) newMock(IFormComponent.class);
+ return newMock(IFormComponent.class);
}
}
Modified: tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/BeanPropertySelectionModelTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/BeanPropertySelectionModelTest.java?rev=417554&r1=417553&r2=417554&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/BeanPropertySelectionModelTest.java (original)
+++ tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/BeanPropertySelectionModelTest.java Tue Jun 27 11:56:34 2006
@@ -13,10 +13,13 @@
// limitations under the License.
package org.apache.tapestry.form;
+import static org.testng.AssertJUnit.assertEquals;
+
import java.util.ArrayList;
import java.util.List;
-import org.apache.hivemind.test.HiveMindTestCase;
+import org.apache.tapestry.BaseComponentTestCase;
+import org.testng.annotations.Test;
/**
@@ -24,7 +27,8 @@
*
* @author jkuhnert
*/
-public class BeanPropertySelectionModelTest extends HiveMindTestCase
+@Test
+public class BeanPropertySelectionModelTest extends BaseComponentTestCase
{
/**
Modified: tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/FormComponentContributorTestCase.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/FormComponentContributorTestCase.java?rev=417554&r1=417553&r2=417554&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/FormComponentContributorTestCase.java (original)
+++ tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/FormComponentContributorTestCase.java Tue Jun 27 11:56:34 2006
@@ -26,6 +26,7 @@
import org.apache.tapestry.IRequestCycle;
import org.apache.tapestry.PageRenderSupport;
import org.apache.tapestry.junit.TapestryTestCase;
+import org.testng.annotations.Test;
/**
* Abstract test case for {@link FormComponentContributor}.
@@ -33,6 +34,7 @@
* @author Paul Ferraro
* @since 4.0
*/
+@Test
public abstract class FormComponentContributorTestCase extends TapestryTestCase
{
// Paul,
@@ -109,17 +111,17 @@
protected IFormComponent newField()
{
- return (IFormComponent) newMock(IFormComponent.class);
+ return newMock(IFormComponent.class);
}
protected IMarkupWriter newWriter()
{
- return (IMarkupWriter) newMock(IMarkupWriter.class);
+ return newMock(IMarkupWriter.class);
}
protected IRequestCycle newCycle()
{
- return (IRequestCycle) newMock(IRequestCycle.class);
+ return newMock(IRequestCycle.class);
}
protected ValidationMessages newValidationMessages(Locale locale)
Modified: tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/FormFixture.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/FormFixture.java?rev=417554&r1=417553&r2=417554&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/FormFixture.java (original)
+++ tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/FormFixture.java Tue Jun 27 11:56:34 2006
@@ -14,7 +14,7 @@
package org.apache.tapestry.form;
-import junit.framework.Assert;
+import static org.testng.AssertJUnit.assertSame;
import org.apache.tapestry.IMarkupWriter;
import org.apache.tapestry.IRequestCycle;
@@ -37,8 +37,8 @@
@Override
protected FormSupport newFormSupport(IMarkupWriter writer, IRequestCycle cycle)
{
- Assert.assertSame(getExpectedWriter(), writer);
- Assert.assertSame(getExpectedRequestCycle(), cycle);
+ assertSame(getExpectedWriter(), writer);
+ assertSame(getExpectedRequestCycle(), cycle);
return getFormSupport();
}
Modified: tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/FormSupportTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/FormSupportTest.java?rev=417554&r1=417553&r2=417554&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/FormSupportTest.java (original)
+++ tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/FormSupportTest.java Tue Jun 27 11:56:34 2006
@@ -35,6 +35,7 @@
import org.apache.tapestry.event.BrowserEvent;
import org.apache.tapestry.services.impl.ComponentEventInvoker;
import org.apache.tapestry.valid.IValidationDelegate;
+import org.testng.annotations.Test;
/**
* Tests for {@link org.apache.tapestry.form.FormSupportImpl}.
@@ -42,6 +43,7 @@
* @author Howard M. Lewis Ship
* @since 4.0
*/
+@Test
public class FormSupportTest extends BaseComponentTestCase
{
@@ -69,22 +71,22 @@
private IValidationDelegate newDelegate()
{
- return (IValidationDelegate) newMock(IValidationDelegate.class);
+ return newMock(IValidationDelegate.class);
}
protected IEngine newEngine()
{
- return (IEngine) newMock(IEngine.class);
+ return newMock(IEngine.class);
}
private IFormComponent newField()
{
- return (IFormComponent) newMock(IFormComponent.class);
+ return newMock(IFormComponent.class);
}
private IFormComponent newFormComponent(String id, String name)
{
- IFormComponent component = (IFormComponent) newMock(IFormComponent.class);
+ IFormComponent component = newMock(IFormComponent.class);
trainGetId(component, id);
@@ -95,7 +97,7 @@
private IFormComponent newFormComponent(String id, String extendedId, Location location)
{
- IFormComponent component = (IFormComponent) newMock(IFormComponent.class);
+ IFormComponent component = newMock(IFormComponent.class);
trainGetId(component, id);
trainGetExtendedId(component, extendedId);
@@ -127,7 +129,7 @@
// Create a body, just to provie it doesn't get invoked.
- IRender body = (IRender) newMock(IRender.class);
+ IRender body = newMock(IRender.class);
form.setBody(body);
@@ -218,7 +220,7 @@
IRequestCycle cycle = newCycle();
IValidationDelegate delegate = newDelegate();
MockForm form = new MockForm(delegate);
- ComponentEventInvoker invoker = (ComponentEventInvoker)newMock(ComponentEventInvoker.class);
+ ComponentEventInvoker invoker = newMock(ComponentEventInvoker.class);
trainIsRewound(cycle, form, true);
trainGetPageRenderSupport(cycle, null);
Modified: tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/FormTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/FormTest.java?rev=417554&r1=417553&r2=417554&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/FormTest.java (original)
+++ tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/FormTest.java Tue Jun 27 11:56:34 2006
@@ -33,6 +33,7 @@
import org.apache.tapestry.listener.ListenerInvoker;
import org.apache.tapestry.valid.IValidationDelegate;
import org.apache.tapestry.web.WebResponse;
+import org.testng.annotations.Test;
/**
* Tests for {@link org.apache.tapestry.form.Form}. Most of the testing is, still alas, done with
@@ -41,16 +42,17 @@
* @author Howard Lewis Ship
* @since 4.0
*/
+@Test
public class FormTest extends BaseComponentTestCase
{
private IActionListener newListener()
{
- return (IActionListener) newMock(IActionListener.class);
+ return newMock(IActionListener.class);
}
private FormSupport newFormSupport()
{
- return (FormSupport) newMock(FormSupport.class);
+ return newMock(FormSupport.class);
}
protected void trainGetNextActionId(IRequestCycle cycle, String actionId)
@@ -65,7 +67,7 @@
protected WebResponse newResponse()
{
- return (WebResponse) newMock(WebResponse.class);
+ return newMock(WebResponse.class);
}
protected void trainGetNamespace(WebResponse response, String namespace)
@@ -75,7 +77,7 @@
protected IValidationDelegate newDelegate()
{
- return (IValidationDelegate) newMock(IValidationDelegate.class);
+ return newMock(IValidationDelegate.class);
}
public void testRewind()
@@ -87,7 +89,7 @@
IActionListener listener = newListener();
ListenerInvoker invoker = newListenerInvoker();
- Form form = (Form) newInstance(FormFixture.class, new Object[]
+ Form form = newInstance(FormFixture.class, new Object[]
{ "id", "myform", "direct", true, "expectedWriter", writer, "expectedRequestCycle", cycle,
"formSupport", support, "listener", listener, "listenerInvoker", invoker,
"delegate", delegate });
@@ -124,7 +126,7 @@
private ListenerInvoker newListenerInvoker()
{
- return (ListenerInvoker) newMock(ListenerInvoker.class);
+ return newMock(ListenerInvoker.class);
}
public void testBasicRender()
@@ -138,7 +140,7 @@
IRender render = newRender();
IValidationDelegate delegate = newDelegate();
- Form form = (Form) newInstance(FormFixture.class, new Object[]
+ Form form = newInstance(FormFixture.class, new Object[]
{ "id", "myform", "direct", true, "expectedWriter", writer, "expectedRequestCycle", cycle,
"formSupport", support, "response", response, "directService", direct, "method",
"post", "delegate", delegate });
@@ -184,7 +186,7 @@
IRender render = newRender();
IValidationDelegate delegate = newDelegate();
- Form form = (Form) newInstance(FormFixture.class, new Object[]
+ Form form = newInstance(FormFixture.class, new Object[]
{ "id", "myform", "direct", true, "expectedWriter", writer, "expectedRequestCycle", cycle,
"formSupport", support, "response", response, "directService", direct, "method",
"post", "delegate", delegate, "scheme", "https", "port", new Integer(443) });
@@ -243,7 +245,7 @@
replay();
- Form form = (Form) newInstance(Form.class, new Object[]
+ Form form = newInstance(Form.class, new Object[]
{ "listener", listener, "cancel", cancel });
assertSame(cancel, form.findListener(FormConstants.SUBMIT_CANCEL));
@@ -271,7 +273,7 @@
replay();
- Form form = (Form) newInstance(Form.class, new Object[]
+ Form form = newInstance(Form.class, new Object[]
{ "listener", listener, "refresh", refresh });
assertSame(refresh, form.findListener(FormConstants.SUBMIT_REFRESH));
@@ -285,7 +287,7 @@
replay();
- Form form = (Form) newInstance(Form.class, new Object[]
+ Form form = newInstance(Form.class, new Object[]
{ "listener", listener });
assertSame(listener, form.findListener(FormConstants.SUBMIT_REFRESH));
@@ -304,7 +306,7 @@
replay();
- Form form = (Form) newInstance(Form.class, new Object[]
+ Form form = newInstance(Form.class, new Object[]
{ "delegate", delegate, "success", success, "cancel", cancel, "refresh", refresh,
"listener", listener });
@@ -324,7 +326,7 @@
replay();
- Form form = (Form) newInstance(Form.class, new Object[]
+ Form form = newInstance(Form.class, new Object[]
{ "delegate", delegate, "success", success, "cancel", cancel, "refresh", refresh,
"listener", listener });
@@ -335,7 +337,7 @@
private IValidationDelegate newDelegate(boolean hasErrors)
{
- IValidationDelegate delegate = (IValidationDelegate) newMock(IValidationDelegate.class);
+ IValidationDelegate delegate = newMock(IValidationDelegate.class);
expect(delegate.getHasErrors()).andReturn(hasErrors);
Modified: tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/LabeledPropertySelectionModelTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/LabeledPropertySelectionModelTest.java?rev=417554&r1=417553&r2=417554&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/LabeledPropertySelectionModelTest.java (original)
+++ tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/LabeledPropertySelectionModelTest.java Tue Jun 27 11:56:34 2006
@@ -14,6 +14,8 @@
package org.apache.tapestry.form;
+import org.testng.annotations.Test;
+
import junit.framework.TestCase;
/**
@@ -22,6 +24,7 @@
* @author Paul Ferraro
* @since 4.0
*/
+@Test
public class LabeledPropertySelectionModelTest extends TestCase
{
public void testNullValue()
Modified: tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/LinkSubmitTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/LinkSubmitTest.java?rev=417554&r1=417553&r2=417554&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/LinkSubmitTest.java (original)
+++ tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/LinkSubmitTest.java Tue Jun 27 11:56:34 2006
@@ -36,6 +36,7 @@
import org.apache.tapestry.PageRenderSupport;
import org.apache.tapestry.TapestryUtils;
import org.apache.tapestry.valid.IValidationDelegate;
+import org.testng.annotations.Test;
/**
* Tests for {@link org.apache.tapestry.form.LinkSubmit}
@@ -43,6 +44,7 @@
* @author Howard Lewis Ship
* @since 4.0
*/
+@Test
public class LinkSubmitTest extends BaseComponentTestCase
{
private class ScriptFixture implements IScript
Modified: tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/TestButton.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/TestButton.java?rev=417554&r1=417553&r2=417554&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/TestButton.java (original)
+++ tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/TestButton.java Tue Jun 27 11:56:34 2006
@@ -19,12 +19,14 @@
import org.apache.tapestry.IMarkupWriter;
import org.apache.tapestry.IRequestCycle;
import org.apache.tapestry.spec.ComponentSpecification;
+import org.testng.annotations.Test;
+@Test
public class TestButton extends BaseComponentTestCase
{
public void testRender()
{
- Button b = (Button) newInstance(Button.class, new Object[]
+ Button b = newInstance(Button.class, new Object[]
{ "name", "assignedName" });
IMarkupWriter writer = newBufferWriter();
@@ -41,7 +43,7 @@
public void testRenderLabel()
{
- Button b = (Button) newInstance(Button.class, new Object[]
+ Button b = newInstance(Button.class, new Object[]
{ "name", "assignedName", "label", "Label" });
IMarkupWriter writer = newBufferWriter();
@@ -58,7 +60,7 @@
public void testRenderInformalParameters()
{
- Button b = (Button) newInstance(Button.class, new Object[]
+ Button b = newInstance(Button.class, new Object[]
{ "name", "assignedName", "specification", new ComponentSpecification() });
IMarkupWriter writer = newBufferWriter();
@@ -79,7 +81,7 @@
public void testRenderWithId()
{
- Button b = (Button) newInstance(Button.class, new Object[]
+ Button b = newInstance(Button.class, new Object[]
{ "idParameter", "foo", "name", "assignedName" });
IMarkupWriter writer = newBufferWriter();
Modified: tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/TestCheckbox.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/TestCheckbox.java?rev=417554&r1=417553&r2=417554&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/TestCheckbox.java (original)
+++ tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/TestCheckbox.java Tue Jun 27 11:56:34 2006
@@ -25,6 +25,7 @@
import org.apache.tapestry.spec.ComponentSpecification;
import org.apache.tapestry.valid.IValidationDelegate;
import org.apache.tapestry.valid.ValidatorException;
+import org.testng.annotations.Test;
/**
* Tests for the {@link org.apache.tapestry.form.Checkbox} component.
@@ -32,11 +33,12 @@
* @author Howard Lewis Ship
* @since 4.0
*/
+@Test
public class TestCheckbox extends BaseFormComponentTestCase
{
public void testRenderChecked()
{
- Checkbox cb = (Checkbox) newInstance(Checkbox.class, new Object[]
+ Checkbox cb = newInstance(Checkbox.class, new Object[]
{ "name", "assignedName", "value", Boolean.TRUE });
IMarkupWriter writer = newBufferWriter();
@@ -53,7 +55,7 @@
public void testRenderDisabled()
{
- Checkbox cb = (Checkbox) newInstance(Checkbox.class, new Object[]
+ Checkbox cb = newInstance(Checkbox.class, new Object[]
{ "name", "assignedName", "disabled", Boolean.TRUE });
IMarkupWriter writer = newBufferWriter();
@@ -70,7 +72,7 @@
public void testRenderInformalParameters()
{
- Checkbox cb = (Checkbox) newInstance(Checkbox.class, new Object[]
+ Checkbox cb = newInstance(Checkbox.class, new Object[]
{ "name", "assignedName", "value", Boolean.TRUE, "specification",
new ComponentSpecification() });
@@ -92,7 +94,7 @@
public void testRenderWithId()
{
- Checkbox cb = (Checkbox) newInstance(Checkbox.class, new Object[]
+ Checkbox cb = newInstance(Checkbox.class, new Object[]
{ "idParameter", "foo", "name", "assignedName", "value", Boolean.TRUE });
IMarkupWriter writer = newBufferWriter();
@@ -109,9 +111,9 @@
public void testSubmitNull()
{
- ValidatableFieldSupport vfs = (ValidatableFieldSupport) newMock(ValidatableFieldSupport.class);
+ ValidatableFieldSupport vfs = newMock(ValidatableFieldSupport.class);
- Checkbox cb = (Checkbox) newInstance(Checkbox.class, new Object[]
+ Checkbox cb = newInstance(Checkbox.class, new Object[]
{ "value", Boolean.TRUE, "name", "checkbox", "validatableFieldSupport", vfs });
IMarkupWriter writer = newWriter();
@@ -142,7 +144,7 @@
IValidationDelegate delegate = newDelegate();
- Checkbox cb = (Checkbox) newInstance(Checkbox.class, new Object[]
+ Checkbox cb = newInstance(Checkbox.class, new Object[]
{ "form", form, "value", Boolean.FALSE, "name", "checkbox", "validatableFieldSupport", vfs });
IMarkupWriter writer = newWriter();
@@ -175,9 +177,9 @@
public void testSubmitNonNull()
{
- ValidatableFieldSupport vfs = (ValidatableFieldSupport) newMock(ValidatableFieldSupport.class);
+ ValidatableFieldSupport vfs = newMock(ValidatableFieldSupport.class);
- Checkbox cb = (Checkbox) newInstance(Checkbox.class, new Object[]
+ Checkbox cb = newInstance(Checkbox.class, new Object[]
{ "value", Boolean.FALSE, "name", "checkbox", "validatableFieldSupport", vfs });
IMarkupWriter writer = newWriter();
Modified: tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/TestFormComponentContributorContext.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/TestFormComponentContributorContext.java?rev=417554&r1=417553&r2=417554&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/TestFormComponentContributorContext.java (original)
+++ tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/TestFormComponentContributorContext.java Tue Jun 27 11:56:34 2006
@@ -27,6 +27,7 @@
import org.apache.tapestry.PageRenderSupport;
import org.apache.tapestry.TapestryUtils;
import org.apache.tapestry.services.Infrastructure;
+import org.testng.annotations.Test;
/**
* Tests for {@link org.apache.tapestry.form.FormComponentContributorContextImpl}.
@@ -34,6 +35,7 @@
* @author Howard Lewis Ship
* @since 4.0
*/
+@Test
public class TestFormComponentContributorContext extends BaseComponentTestCase
{
private IForm newForm(String name)
@@ -56,7 +58,7 @@
private ClassResolver newResolver()
{
- return (ClassResolver) newMock(ClassResolver.class);
+ return newMock(ClassResolver.class);
}
private Infrastructure newInfrastructure(ClassResolver resolver)
@@ -128,6 +130,6 @@
private PageRenderSupport newSupport()
{
- return (PageRenderSupport) newMock(PageRenderSupport.class);
+ return newMock(PageRenderSupport.class);
}
}
Modified: tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/TestImageSubmit.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/TestImageSubmit.java?rev=417554&r1=417553&r2=417554&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/TestImageSubmit.java (original)
+++ tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/TestImageSubmit.java Tue Jun 27 11:56:34 2006
@@ -28,6 +28,7 @@
import org.apache.tapestry.test.Creator;
import org.apache.tapestry.valid.IValidationDelegate;
import org.apache.tapestry.valid.ValidationConstants;
+import org.testng.annotations.Test;
/**
* Tests for {@link org.apache.tapestry.form.ImageSubmit}.
@@ -35,11 +36,12 @@
* @author Howard M. Lewis Ship
* @since 4.0
*/
+@Test
public class TestImageSubmit extends BaseFormComponentTestCase
{
protected IAsset newAsset(IRequestCycle cycle, String imageURL)
{
- IAsset asset = (IAsset)newMock(IAsset.class);
+ IAsset asset = newMock(IAsset.class);
expect(asset.buildURL()).andReturn(imageURL);
@@ -51,7 +53,7 @@
Creator creator = new Creator();
ImageSubmit submit = (ImageSubmit) creator.newInstance(ImageSubmit.class);
- IForm form = (IForm)newMock(IForm.class);
+ IForm form = newMock(IForm.class);
IRequestCycle cycle = newCycle();
IMarkupWriter writer = newWriter();
Modified: tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/TestListEditMap.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/TestListEditMap.java?rev=417554&r1=417553&r2=417554&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/TestListEditMap.java (original)
+++ tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/TestListEditMap.java Tue Jun 27 11:56:34 2006
@@ -21,6 +21,7 @@
import org.apache.tapestry.junit.TapestryTestCase;
import org.apache.tapestry.spec.BeanLifecycle;
+import org.testng.annotations.Test;
/**
* Suite of tests for {@link org.apache.tapestry.form.ListEditMap}.
@@ -28,7 +29,7 @@
* @author Howard Lewis Ship
* @since 3.0
*/
-
+@Test
public class TestListEditMap extends TapestryTestCase
{
Modified: tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/TestSubmit.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/TestSubmit.java?rev=417554&r1=417553&r2=417554&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/TestSubmit.java (original)
+++ tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/TestSubmit.java Tue Jun 27 11:56:34 2006
@@ -31,6 +31,7 @@
import org.apache.tapestry.test.Creator;
import org.apache.tapestry.valid.IValidationDelegate;
import org.apache.tapestry.valid.ValidationConstants;
+import org.testng.annotations.Test;
/**
* Tests for {@link org.apache.tapestry.form.Submit}.
@@ -38,6 +39,7 @@
* @author Howard M. Lewis Ship
* @since 4.0
*/
+@Test
public class TestSubmit extends BaseFormComponentTestCase
{
public void testPrerendered()
@@ -45,7 +47,7 @@
Creator creator = new Creator();
Submit submit = (Submit) creator.newInstance(Submit.class);
- IForm form = (IForm)newMock(IForm.class);
+ IForm form = newMock(IForm.class);
IRequestCycle cycle = newCycle();
IMarkupWriter writer = newWriter();
Modified: tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/TestTextArea.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/TestTextArea.java?rev=417554&r1=417553&r2=417554&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/TestTextArea.java (original)
+++ tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/TestTextArea.java Tue Jun 27 11:56:34 2006
@@ -26,6 +26,7 @@
import org.apache.tapestry.spec.ComponentSpecification;
import org.apache.tapestry.valid.IValidationDelegate;
import org.apache.tapestry.valid.ValidatorException;
+import org.testng.annotations.Test;
/**
* Tests for {@link org.apache.tapestry.form.TextArea}.
@@ -33,6 +34,7 @@
* @author Howard M. Lewis Ship
* @since 4.0
*/
+@Test
public class TestTextArea extends BaseFormComponentTestCase
{
public void testRewind()
Modified: tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/TestTextField.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/TestTextField.java?rev=417554&r1=417553&r2=417554&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/TestTextField.java (original)
+++ tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/TestTextField.java Tue Jun 27 11:56:34 2006
@@ -26,6 +26,7 @@
import org.apache.tapestry.spec.ComponentSpecification;
import org.apache.tapestry.valid.IValidationDelegate;
import org.apache.tapestry.valid.ValidatorException;
+import org.testng.annotations.Test;
/**
* Tests for {@link org.apache.tapestry.form.TextField}.
@@ -33,6 +34,7 @@
* @author Howard M. Lewis Ship
* @since 4.0
*/
+@Test
public class TestTextField extends BaseFormComponentTestCase
{
public void testRewind()
@@ -40,7 +42,7 @@
TranslatedFieldSupport tfs = newMock(TranslatedFieldSupport.class);
ValidatableFieldSupport vfs = newMock(ValidatableFieldSupport.class);
- TextField component = (TextField) newInstance(TextField.class, new Object[]
+ TextField component = newInstance(TextField.class, new Object[]
{ "translatedFieldSupport", tfs, "validatableFieldSupport", vfs });
IRequestCycle cycle = newCycle();
@@ -89,7 +91,7 @@
TranslatedFieldSupport tfs = newMock(TranslatedFieldSupport.class);
ValidatableFieldSupport vfs = newMock(ValidatableFieldSupport.class);
- TextField component = (TextField) newInstance(TextField.class, new Object[]
+ TextField component = newInstance(TextField.class, new Object[]
{ "translatedFieldSupport", tfs, "validatableFieldSupport", vfs });
IRequestCycle cycle = newCycle();
@@ -139,7 +141,7 @@
TranslatedFieldSupport tfs = newMock(TranslatedFieldSupport.class);
ValidatableFieldSupport vfs = newMock(ValidatableFieldSupport.class);
- TextField component = (TextField) newInstance(TextField.class, new Object[]
+ TextField component = newInstance(TextField.class, new Object[]
{ "translatedFieldSupport", tfs, "validatableFieldSupport", vfs });
IRequestCycle cycle = newCycle();
@@ -272,7 +274,7 @@
{
TranslatedFieldSupport tfs = newMock(TranslatedFieldSupport.class);
- ValidatableFieldSupport vfs = (ValidatableFieldSupport) newMock(ValidatableFieldSupport.class);
+ ValidatableFieldSupport vfs = newMock(ValidatableFieldSupport.class);
IRequestCycle cycle = newCycle();
IForm form = newMock(IForm.class);
@@ -281,7 +283,7 @@
MockDelegate delegate = new MockDelegate();
- TextField component = (TextField) newInstance(TextField.class, new Object[]
+ TextField component = newInstance(TextField.class, new Object[]
{ "name", "fred", "translatedFieldSupport", tfs, "validatableFieldSupport", vfs, "value", new Integer(10) });
trainGetForm(cycle, form);
@@ -318,7 +320,7 @@
{
TranslatedFieldSupport tfs = newMock(TranslatedFieldSupport.class);
- ValidatableFieldSupport vfs = (ValidatableFieldSupport) newMock(ValidatableFieldSupport.class);
+ ValidatableFieldSupport vfs = newMock(ValidatableFieldSupport.class);
IRequestCycle cycle = newCycle();
IForm form = newMock(IForm.class);
@@ -327,7 +329,7 @@
MockDelegate delegate = new MockDelegate();
- TextField component = (TextField) newInstance(TextField.class, new Object[]
+ TextField component = newInstance(TextField.class, new Object[]
{ "name", "fred", "translatedFieldSupport", tfs, "validatableFieldSupport", vfs, "value", new Integer(10), "hidden", Boolean.TRUE });
trainGetForm(cycle, form);
@@ -364,7 +366,7 @@
{
TranslatedFieldSupport tfs = newMock(TranslatedFieldSupport.class);
- ValidatableFieldSupport vfs = (ValidatableFieldSupport) newMock(ValidatableFieldSupport.class);
+ ValidatableFieldSupport vfs = newMock(ValidatableFieldSupport.class);
IRequestCycle cycle = newCycle();
IForm form = newMock(IForm.class);
@@ -373,7 +375,7 @@
MockDelegate delegate = new MockDelegate();
- TextField component = (TextField) newInstance(TextField.class, new Object[]
+ TextField component = newInstance(TextField.class, new Object[]
{ "name", "fred", "translatedFieldSupport", tfs, "validatableFieldSupport", vfs, "value", new Integer(10), "disabled", Boolean.TRUE });
trainGetForm(cycle, form);
@@ -410,7 +412,7 @@
{
TranslatedFieldSupport tfs = newMock(TranslatedFieldSupport.class);
- ValidatableFieldSupport vfs = (ValidatableFieldSupport) newMock(ValidatableFieldSupport.class);
+ ValidatableFieldSupport vfs = newMock(ValidatableFieldSupport.class);
IRequestCycle cycle = newCycle();
IForm form = newMock(IForm.class);
@@ -421,7 +423,7 @@
IBinding binding = newBinding("informal-value");
- TextField component = (TextField) newInstance(TextField.class, new Object[]
+ TextField component = newInstance(TextField.class, new Object[]
{ "name", "fred", "translatedFieldSupport", tfs, "validatableFieldSupport", vfs, "value", new Integer(10), "specification", new ComponentSpecification() });
component.setBinding("informal", binding);
@@ -460,7 +462,7 @@
{
TranslatedFieldSupport tfs = newMock(TranslatedFieldSupport.class);
- ValidatableFieldSupport vfs = (ValidatableFieldSupport) newMock(ValidatableFieldSupport.class);
+ ValidatableFieldSupport vfs = newMock(ValidatableFieldSupport.class);
IRequestCycle cycle = newCycle();
IForm form = newMock(IForm.class);
@@ -469,7 +471,7 @@
MockDelegate delegate = new MockDelegate();
- TextField component = (TextField) newInstance(TextField.class, new Object[]
+ TextField component = newInstance(TextField.class, new Object[]
{ "name", "fred", "translatedFieldSupport", tfs, "validatableFieldSupport", vfs });
trainGetForm(cycle, form);
@@ -506,7 +508,7 @@
{
ValidatableFieldSupport support = newMock(ValidatableFieldSupport.class);
- TextField field = (TextField) newInstance(TextField.class, new Object[]
+ TextField field = newInstance(TextField.class, new Object[]
{ "validatableFieldSupport", support, });
expect(support.isRequired(field)).andReturn(true);
Modified: tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/TestTranslatedFieldSupportImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/TestTranslatedFieldSupportImpl.java?rev=417554&r1=417553&r2=417554&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/TestTranslatedFieldSupportImpl.java (original)
+++ tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/TestTranslatedFieldSupportImpl.java Tue Jun 27 11:56:34 2006
@@ -34,6 +34,7 @@
import org.apache.tapestry.services.Infrastructure;
import org.apache.tapestry.valid.IValidationDelegate;
import org.apache.tapestry.valid.ValidatorException;
+import org.testng.annotations.Test;
/**
* Test case for {@link TranslatedFieldSupportImpl}.
@@ -41,6 +42,7 @@
* @author Paul Ferraro
* @since 4.0
*/
+@Test
public class TestTranslatedFieldSupportImpl extends BaseComponentTestCase
{
private ThreadLocale newThreadLocale()
Modified: tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/TestValidatableFieldSupportImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/TestValidatableFieldSupportImpl.java?rev=417554&r1=417553&r2=417554&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/TestValidatableFieldSupportImpl.java (original)
+++ tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/TestValidatableFieldSupportImpl.java Tue Jun 27 11:56:34 2006
@@ -40,6 +40,7 @@
import org.apache.tapestry.form.validator.Validator;
import org.apache.tapestry.services.Infrastructure;
import org.apache.tapestry.valid.ValidatorException;
+import org.testng.annotations.Test;
/**
* Test case for {@link ValidatableFieldSupportImpl}.
@@ -47,6 +48,7 @@
* @author Paul Ferraro
* @since 4.0
*/
+@Test
public class TestValidatableFieldSupportImpl extends BaseComponentTestCase
{
private ThreadLocale newThreadLocale()
@@ -66,11 +68,11 @@
{
IRequestCycle cycle = newCycle();
- ClassResolver cr = (ClassResolver) newMock(ClassResolver.class);
+ ClassResolver cr = newMock(ClassResolver.class);
Infrastructure infra = newMock(Infrastructure.class);
- PageRenderSupport prs = (PageRenderSupport) newMock(PageRenderSupport.class);
+ PageRenderSupport prs = newMock(PageRenderSupport.class);
expect(cycle.getInfrastructure()).andReturn(infra);
Modified: tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/TestValidationMessages.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/TestValidationMessages.java?rev=417554&r1=417553&r2=417554&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/TestValidationMessages.java (original)
+++ tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/TestValidationMessages.java Tue Jun 27 11:56:34 2006
@@ -24,6 +24,7 @@
import org.apache.tapestry.BaseComponentTestCase;
import org.apache.tapestry.IComponent;
import org.apache.tapestry.valid.ValidationStrings;
+import org.testng.annotations.Test;
/**
* Tests for {@link org.apache.tapestry.form.ValidationMessagesImpl}.
@@ -31,11 +32,12 @@
* @author Howard Lewis Ship
* @since 4.0
*/
+@Test
public class TestValidationMessages extends BaseComponentTestCase
{
private IFormComponent newField()
{
- return (IFormComponent) newMock(IFormComponent.class);
+ return newMock(IFormComponent.class);
}
public void testMessageOverrideNull()
Modified: tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/translator/TestDateTranslator.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/translator/TestDateTranslator.java?rev=417554&r1=417553&r2=417554&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/translator/TestDateTranslator.java (original)
+++ tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/translator/TestDateTranslator.java Tue Jun 27 11:56:34 2006
@@ -28,6 +28,7 @@
import org.apache.tapestry.valid.ValidationConstraint;
import org.apache.tapestry.valid.ValidationStrings;
import org.apache.tapestry.valid.ValidatorException;
+import org.testng.annotations.Test;
/**
* Test case for {@link DateTranslator}.
@@ -35,6 +36,7 @@
* @author Paul Ferraro
* @since 4.0
*/
+@Test
public class TestDateTranslator extends TranslatorTestCase
{
private Calendar _calendar = Calendar.getInstance();
@@ -236,7 +238,7 @@
IFormComponent field = newFieldWithClientId("foo");
- FormComponentContributorContext context = (FormComponentContributorContext) newMock(FormComponentContributorContext.class);
+ FormComponentContributorContext context = newMock(FormComponentContributorContext.class);
trainTrim(context, "foo");
Modified: tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/translator/TestNumberTranslator.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/translator/TestNumberTranslator.java?rev=417554&r1=417553&r2=417554&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/translator/TestNumberTranslator.java (original)
+++ tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/translator/TestNumberTranslator.java Tue Jun 27 11:56:34 2006
@@ -27,6 +27,7 @@
import org.apache.tapestry.valid.ValidationConstraint;
import org.apache.tapestry.valid.ValidationStrings;
import org.apache.tapestry.valid.ValidatorException;
+import org.testng.annotations.Test;
/**
* Tests for {@link org.apache.tapestry.form.translator.NumberTranslator}
@@ -34,6 +35,7 @@
* @author Howard Lewis Ship
* @since 4.0
*/
+@Test
public class TestNumberTranslator extends FormComponentContributorTestCase
{
public void testDefaultFormat()
Modified: tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/translator/TestStringTranslator.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/translator/TestStringTranslator.java?rev=417554&r1=417553&r2=417554&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/translator/TestStringTranslator.java (original)
+++ tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/translator/TestStringTranslator.java Tue Jun 27 11:56:34 2006
@@ -21,6 +21,7 @@
import org.apache.tapestry.form.FormComponentContributorContext;
import org.apache.tapestry.form.IFormComponent;
import org.apache.tapestry.valid.ValidatorException;
+import org.testng.annotations.Test;
/**
* Test case for {@link StringTranslator}.
@@ -28,6 +29,7 @@
* @author Paul Ferraro
* @since 4.0
*/
+@Test
public class TestStringTranslator extends TranslatorTestCase
{
private StringTranslator _translator = new StringTranslator();
Modified: tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/translator/TestTranslatorBinding.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/translator/TestTranslatorBinding.java?rev=417554&r1=417553&r2=417554&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/translator/TestTranslatorBinding.java (original)
+++ tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/translator/TestTranslatorBinding.java Tue Jun 27 11:56:34 2006
@@ -26,6 +26,7 @@
import org.apache.tapestry.IComponent;
import org.apache.tapestry.binding.BindingTestCase;
import org.apache.tapestry.coerce.ValueConverter;
+import org.testng.annotations.Test;
/**
* Tests for {@link org.apache.tapestry.form.translator.TranslatorBinding} and
@@ -34,6 +35,7 @@
* @author Howard Lewis Ship
* @since 4.0
*/
+@Test
public class TestTranslatorBinding extends BindingTestCase
{
public void testCreate()
Modified: tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/translator/TranslatorTestCase.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/translator/TranslatorTestCase.java?rev=417554&r1=417553&r2=417554&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/translator/TranslatorTestCase.java (original)
+++ tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/translator/TranslatorTestCase.java Tue Jun 27 11:56:34 2006
@@ -18,6 +18,7 @@
import org.apache.tapestry.form.FormComponentContributorTestCase;
import org.apache.tapestry.form.FormEventType;
+import org.testng.annotations.Test;
/**
* Abstract test case for {@link Translator}.
@@ -25,6 +26,7 @@
* @author Paul Ferraro
* @since 4.0
*/
+@Test
public abstract class TranslatorTestCase extends FormComponentContributorTestCase
{
protected void trim()
Modified: tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/validator/BaseValidatorTestCase.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/validator/BaseValidatorTestCase.java?rev=417554&r1=417553&r2=417554&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/validator/BaseValidatorTestCase.java (original)
+++ tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/validator/BaseValidatorTestCase.java Tue Jun 27 11:56:34 2006
@@ -34,7 +34,7 @@
{
protected IFormComponent newField(String displayName)
{
- IFormComponent field = (IFormComponent)newMock(IFormComponent.class);
+ IFormComponent field = newMock(IFormComponent.class);
expect(field.getDisplayName()).andReturn(displayName);
@@ -43,7 +43,7 @@
protected IFormComponent newField(String displayName, String clientId)
{
- IFormComponent field = (IFormComponent)newMock(IFormComponent.class);
+ IFormComponent field = newMock(IFormComponent.class);
checkOrder(field, false);
expect(field.getClientId()).andReturn(clientId).anyTimes();
@@ -54,18 +54,18 @@
protected IFormComponent newField()
{
- return (IFormComponent) newMock(IFormComponent.class);
+ return newMock(IFormComponent.class);
}
protected ValidationMessages newMessages()
{
- return (ValidationMessages) newMock(ValidationMessages.class);
+ return newMock(ValidationMessages.class);
}
protected ValidationMessages newMessages(String messageOverride, String messageKey,
Object[] parameters, String result)
{
- ValidationMessages messages = (ValidationMessages)newMock(ValidationMessages.class);
+ ValidationMessages messages = newMock(ValidationMessages.class);
trainFormatMessage(messages, messageOverride, messageKey, parameters, result);
@@ -81,7 +81,7 @@
protected FormComponentContributorContext newContext()
{
- return (FormComponentContributorContext) newMock(FormComponentContributorContext.class);
+ return newMock(FormComponentContributorContext.class);
}
}
Modified: tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/validator/TestEmail.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/validator/TestEmail.java?rev=417554&r1=417553&r2=417554&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/validator/TestEmail.java (original)
+++ tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/validator/TestEmail.java Tue Jun 27 11:56:34 2006
@@ -25,6 +25,7 @@
import org.apache.tapestry.valid.ValidationConstraint;
import org.apache.tapestry.valid.ValidationStrings;
import org.apache.tapestry.valid.ValidatorException;
+import org.testng.annotations.Test;
/**
* Tests for {@link org.apache.tapestry.form.validator.Email}.
@@ -32,6 +33,7 @@
* @author Howard Lewis Ship
* @since 4.0
*/
+@Test
public class TestEmail extends BaseValidatorTestCase
{
public void testOK() throws Exception
@@ -105,8 +107,7 @@
IMarkupWriter writer = newWriter();
IRequestCycle cycle = newCycle();
- FormComponentContributorContext context =
- (FormComponentContributorContext)newMock(FormComponentContributorContext.class);
+ FormComponentContributorContext context = newMock(FormComponentContributorContext.class);
context.includeClasspathScript("/org/apache/tapestry/form/validator/RegExValidator.js");
@@ -132,8 +133,7 @@
IMarkupWriter writer = newWriter();
IRequestCycle cycle = newCycle();
- FormComponentContributorContext context =
- (FormComponentContributorContext)newMock(FormComponentContributorContext.class);
+ FormComponentContributorContext context = newMock(FormComponentContributorContext.class);
context.includeClasspathScript("/org/apache/tapestry/form/validator/RegExValidator.js");
Modified: tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/validator/TestMax.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/validator/TestMax.java?rev=417554&r1=417553&r2=417554&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/validator/TestMax.java (original)
+++ tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/validator/TestMax.java Tue Jun 27 11:56:34 2006
@@ -24,6 +24,7 @@
import org.apache.tapestry.valid.ValidationConstraint;
import org.apache.tapestry.valid.ValidationStrings;
import org.apache.tapestry.valid.ValidatorException;
+import org.testng.annotations.Test;
/**
* Tests for {@link org.apache.tapestry.form.validator.Max}.
@@ -31,6 +32,7 @@
* @author Howard Lewis Ship
* @since 4.0
*/
+@Test
public class TestMax extends BaseValidatorTestCase
{
@@ -100,8 +102,7 @@
IRequestCycle cycle = newCycle();
IFormComponent field = newField("My Field", "myfield");
- FormComponentContributorContext context =
- (FormComponentContributorContext)newMock(FormComponentContributorContext.class);
+ FormComponentContributorContext context = newMock(FormComponentContributorContext.class);
context.includeClasspathScript("/org/apache/tapestry/form/validator/NumberValidator.js");
@@ -123,8 +124,7 @@
IRequestCycle cycle = newCycle();
IFormComponent field = newField("My Field", "myfield");
- FormComponentContributorContext context =
- (FormComponentContributorContext)newMock(FormComponentContributorContext.class);
+ FormComponentContributorContext context = newMock(FormComponentContributorContext.class);
context.includeClasspathScript("/org/apache/tapestry/form/validator/NumberValidator.js");
Modified: tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/validator/TestMaxDate.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/validator/TestMaxDate.java?rev=417554&r1=417553&r2=417554&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/validator/TestMaxDate.java (original)
+++ tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/validator/TestMaxDate.java Tue Jun 27 11:56:34 2006
@@ -26,6 +26,7 @@
import org.apache.tapestry.valid.ValidationConstraint;
import org.apache.tapestry.valid.ValidationStrings;
import org.apache.tapestry.valid.ValidatorException;
+import org.testng.annotations.Test;
/**
* Tests for {@link org.apache.tapestry.form.validator.MaxDate}
@@ -33,6 +34,7 @@
* @author Howard Lewis Ship
* @since 4.0
*/
+@Test
public class TestMaxDate extends BaseValidatorTestCase
{
private static final long ONE_DAY = 24 * 60 * 60 * 1000l;
Modified: tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/validator/TestMaxLength.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/validator/TestMaxLength.java?rev=417554&r1=417553&r2=417554&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/validator/TestMaxLength.java (original)
+++ tapestry/tapestry4/trunk/framework/src/test/org/apache/tapestry/form/validator/TestMaxLength.java Tue Jun 27 11:56:34 2006
@@ -24,7 +24,9 @@
import org.apache.tapestry.valid.ValidationConstraint;
import org.apache.tapestry.valid.ValidationStrings;
import org.apache.tapestry.valid.ValidatorException;
+import org.testng.annotations.Test;
+@Test
public class TestMaxLength extends BaseValidatorTestCase
{
@@ -98,8 +100,7 @@
IRequestCycle cycle = newCycle();
IFormComponent field = newField("My Field", "myfield");
- FormComponentContributorContext context =
- (FormComponentContributorContext)newMock(FormComponentContributorContext.class);
+ FormComponentContributorContext context = newMock(FormComponentContributorContext.class);
context.includeClasspathScript("/org/apache/tapestry/form/validator/StringValidator.js");