You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by hl...@apache.org on 2007/01/03 22:54:14 UTC
svn commit: r492320 -
/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/test/TapestryTestCase.java
Author: hlship
Date: Wed Jan 3 13:54:13 2007
New Revision: 492320
URL: http://svn.apache.org/viewvc?view=rev&rev=492320
Log:
Move a few common testing factory and trainer methods up to IOCTestCase.
Modified:
tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/test/TapestryTestCase.java
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/test/TapestryTestCase.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/test/TapestryTestCase.java?view=diff&rev=492320&r1=492319&r2=492320
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/test/TapestryTestCase.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/test/TapestryTestCase.java Wed Jan 3 13:54:13 2007
@@ -44,7 +44,6 @@
import org.apache.tapestry.ioc.Messages;
import org.apache.tapestry.ioc.Resource;
import org.apache.tapestry.ioc.ServiceLocator;
-import org.apache.tapestry.ioc.services.ThreadLocale;
import org.apache.tapestry.ioc.test.IOCTestCase;
import org.apache.tapestry.model.ComponentModel;
import org.apache.tapestry.model.MutableComponentModel;
@@ -392,11 +391,6 @@
expect(model.getBaseResource()).andReturn(resource).atLeastOnce();
}
- protected final void train_getLocale(ThreadLocale threadLocale, Locale locale)
- {
- expect(threadLocale.getLocale()).andReturn(locale);
- }
-
protected final Asset newAsset()
{
return newMock(Asset.class);
@@ -467,16 +461,6 @@
expect(generator.requiresDigest(path)).andReturn(requiresDigest);
}
- protected final void train_toURL(Resource resource, URL url)
- {
- expect(resource.toURL()).andReturn(url).atLeastOnce();
- }
-
- protected final void train_getPath(Resource r, String path)
- {
- expect(r.getPath()).andReturn(path).atLeastOnce();
- }
-
protected final void train_getPath(Request request, String path)
{
expect(request.getPath()).andReturn(path).atLeastOnce();
@@ -579,17 +563,13 @@
expect(model.getPersistentFieldNames()).andReturn(Arrays.asList(names)).atLeastOnce();
}
- protected final Messages newMessages()
- {
- return newMock(Messages.class);
- }
-
protected final BindingSource newBindingSource()
{
return newMock(BindingSource.class);
}
- protected final void train_getClasspathAsset(AssetSource source, String path, Locale locale, Asset asset)
+ protected final void train_getClasspathAsset(AssetSource source, String path, Locale locale,
+ Asset asset)
{
expect(source.getClasspathAsset(path, locale)).andReturn(asset);
}