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 2008/05/11 19:00:08 UTC
svn commit: r655338 [3/5] - in /tapestry/tapestry5/trunk:
tapestry-component-report/src/main/java/org/apache/tapestry/mojo/
tapestry-core/src/main/java/org/apache/tapestry/
tapestry-core/src/main/java/org/apache/tapestry/corelib/base/
tapestry-core/src...
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app1/pages/ValidForm.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app1/pages/ValidForm.java?rev=655338&r1=655337&r2=655338&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app1/pages/ValidForm.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app1/pages/ValidForm.java Sun May 11 10:00:04 2008
@@ -20,16 +20,16 @@
public class ValidForm
{
@Persist
- private IncidentData _incident;
+ private IncidentData incident;
public IncidentData getIncident()
{
- return _incident;
+ return incident;
}
void onPrepare()
{
- if (_incident == null)
- _incident = new IncidentData();
+ if (incident == null)
+ incident = new IncidentData();
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app1/pages/ViewRegistration.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app1/pages/ViewRegistration.java?rev=655338&r1=655337&r2=655338&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app1/pages/ViewRegistration.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app1/pages/ViewRegistration.java Sun May 11 10:00:04 2008
@@ -20,10 +20,10 @@
public class ViewRegistration
{
@ApplicationState
- private RegistrationData _data;
+ private RegistrationData data;
public RegistrationData getRegistrationData()
{
- return _data;
+ return data;
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app1/pages/ZoneDemo.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app1/pages/ZoneDemo.java?rev=655338&r1=655337&r2=655338&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app1/pages/ZoneDemo.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app1/pages/ZoneDemo.java Sun May 11 10:00:04 2008
@@ -26,23 +26,23 @@
public class ZoneDemo
{
@Component
- private BeanEditForm _form;
+ private BeanEditForm form;
- private String _name;
+ private String name;
@ApplicationState
- private RegistrationData _registration;
+ private RegistrationData registration;
private static final String[] NAMES = { "Fred & Wilma", "Mr. <Roboto>", "Grim Fandango", "Registration" };
@Inject
- private Block _showName;
+ private Block showName;
@Inject
- private Block _registrationForm;
+ private Block registrationForm;
@Inject
- private Block _registrationOutput;
+ private Block registrationOutput;
public String[] getNames()
{
@@ -52,40 +52,40 @@
public String getName()
{
- return _name;
+ return name;
}
public void setName(String name)
{
- _name = name;
+ this.name = name;
}
@Log
Object onActionFromSelect(String name)
{
- _name = name;
+ this.name = name;
- if (name.equals("Registration")) return _registrationForm;
+ if (name.equals("Registration")) return registrationForm;
- return _showName;
+ return showName;
}
Object onSuccess()
{
- return _registrationOutput;
+ return registrationOutput;
}
Object onActionFromClear()
{
- _form.clearErrors();
- _registration = null;
+ form.clearErrors();
+ registration = null;
- return _registrationForm;
+ return registrationForm;
}
public RegistrationData getRegistration()
{
- return _registration;
+ return registration;
}
Object onActionFromJSON()
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app1/pages/music/MusicDetails.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app1/pages/music/MusicDetails.java?rev=655338&r1=655337&r2=655338&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app1/pages/music/MusicDetails.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app1/pages/music/MusicDetails.java Sun May 11 10:00:04 2008
@@ -18,20 +18,20 @@
public class MusicDetails
{
- private Track _track;
+ private Track track;
void onActivate(Track track)
{
- _track = track;
+ this.track = track;
}
Object onPassivate()
{
- return _track;
+ return track;
}
public Track getTrack()
{
- return _track;
+ return track;
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app1/pages/nested/AssetDemo.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app1/pages/nested/AssetDemo.java?rev=655338&r1=655337&r2=655338&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app1/pages/nested/AssetDemo.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app1/pages/nested/AssetDemo.java Sun May 11 10:00:04 2008
@@ -22,19 +22,19 @@
{
@Inject
@Path("context:images/tapestry_banner.gif")
- private Asset _icon;
+ private Asset icon;
@Inject
@Path("tapestry-button.png")
- private Asset _button;
+ private Asset button;
public Asset getIcon()
{
- return _icon;
+ return icon;
}
public Asset getButton()
{
- return _button;
+ return button;
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app1/services/MusicLibraryParser.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app1/services/MusicLibraryParser.java?rev=655338&r1=655337&r2=655338&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app1/services/MusicLibraryParser.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app1/services/MusicLibraryParser.java Sun May 11 10:00:04 2008
@@ -15,8 +15,7 @@
package org.apache.tapestry.integration.app1.services;
import org.apache.tapestry.integration.app1.data.Track;
-import static org.apache.tapestry.ioc.internal.util.CollectionFactory.newList;
-import static org.apache.tapestry.ioc.internal.util.CollectionFactory.newStack;
+import org.apache.tapestry.ioc.internal.util.CollectionFactory;
import org.apache.tapestry.ioc.util.Stack;
import org.slf4j.Logger;
import org.xml.sax.Attributes;
@@ -37,7 +36,7 @@
*/
public class MusicLibraryParser
{
- private final Logger _logger;
+ private final Logger logger;
private static final int STATE_START = 0;
@@ -89,35 +88,35 @@
private class Handler extends DefaultHandler
{
- private final List<Track> _tracks = newList();
+ private final List<Track> tracks = CollectionFactory.newList();
- private Stack<Item> _stack = newStack();
+ private Stack<Item> stack = CollectionFactory.newStack();
- private int _state = STATE_START;
+ private int state = STATE_START;
/**
* Most recently seen key.
*/
- private String _key;
+ private String key;
/**
* Currently building Track.
*/
- private Track _track;
+ private Track track;
public List<Track> getTracks()
{
- return _tracks;
+ return tracks;
}
private Item peek()
{
- return _stack.peek();
+ return stack.peek();
}
private void pop()
{
- _state = _stack.pop()._priorState;
+ state = stack.pop()._priorState;
}
private void push(int newState)
@@ -127,11 +126,11 @@
protected void push(int newState, boolean ignoreCharacterData)
{
- Item item = new Item(_state, ignoreCharacterData);
+ Item item = new Item(state, ignoreCharacterData);
- _stack.push(item);
+ stack.push(item);
- _state = newState;
+ state = newState;
}
@Override
@@ -161,7 +160,7 @@
private void begin(String element)
{
- switch (_state)
+ switch (state)
{
case STATE_START:
enterStart(element);
@@ -233,9 +232,9 @@
private void beginDictTrack(String element)
{
- _track = new Track();
+ track = new Track();
- _tracks.add(_track);
+ tracks.add(track);
push(STATE_DICT_TRACK);
}
@@ -264,7 +263,7 @@
private void end(String element)
{
- switch (_state)
+ switch (state)
{
case STATE_COLLECT_KEY:
@@ -282,7 +281,7 @@
private void endCollectKey(String element)
{
- _key = peek().getContent();
+ key = peek().getContent();
pop();
}
@@ -293,44 +292,44 @@
pop();
- if (_key.equals("Track ID"))
+ if (key.equals("Track ID"))
{
- _track.setId(Long.parseLong(value));
+ track.setId(Long.parseLong(value));
}
- if (_key.equals("Name"))
+ if (key.equals("Name"))
{
- _track.setTitle(value);
+ track.setTitle(value);
return;
}
- if (_key.equals("Artist"))
+ if (key.equals("Artist"))
{
- _track.setArtist(value);
+ track.setArtist(value);
return;
}
- if (_key.equals("Album"))
+ if (key.equals("Album"))
{
- _track.setAlbum(value);
+ track.setAlbum(value);
return;
}
- if (_key.equals("Genre"))
+ if (key.equals("Genre"))
{
- _track.setGenre(value);
+ track.setGenre(value);
return;
}
- if (_key.equals("Play Count"))
+ if (key.equals("Play Count"))
{
- _track.setPlayCount(Integer.parseInt(value));
+ track.setPlayCount(Integer.parseInt(value));
return;
}
- if (_key.equals("Rating"))
+ if (key.equals("Rating"))
{
- _track.setRating(Integer.parseInt(value));
+ track.setRating(Integer.parseInt(value));
return;
}
@@ -358,12 +357,12 @@
public MusicLibraryParser(final Logger logger)
{
- _logger = logger;
+ this.logger = logger;
}
public List<Track> parseTracks(URL resource)
{
- _logger.info(format("Parsing music library %s", resource));
+ logger.info(format("Parsing music library %s", resource));
long start = System.currentTimeMillis();
@@ -388,7 +387,7 @@
List<Track> result = handler.getTracks();
long elapsed = System.currentTimeMillis() - start;
- _logger.info(format("Parsed %d tracks in %d ms", result.size(), elapsed));
+ logger.info(format("Parsed %d tracks in %d ms", result.size(), elapsed));
return result;
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app1/services/ReverseStringsWorker.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app1/services/ReverseStringsWorker.java?rev=655338&r1=655337&r2=655338&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app1/services/ReverseStringsWorker.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app1/services/ReverseStringsWorker.java Sun May 11 10:00:04 2008
@@ -19,7 +19,7 @@
public class ReverseStringsWorker implements ComponentClassTransformWorker
{
- private final ComponentMethodAdvice _advice = new ComponentMethodAdvice()
+ private final ComponentMethodAdvice advice = new ComponentMethodAdvice()
{
public void advise(ComponentMethodInvocation invocation)
{
@@ -73,7 +73,7 @@
{
for (TransformMethodSignature sig : transformation.findMethodsWithAnnotation(ReverseStrings.class))
{
- transformation.advise(sig, _advice);
+ transformation.advise(sig, advice);
}
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app1/services/ToDoDatabaseImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app1/services/ToDoDatabaseImpl.java?rev=655338&r1=655337&r2=655338&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app1/services/ToDoDatabaseImpl.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app1/services/ToDoDatabaseImpl.java Sun May 11 10:00:04 2008
@@ -16,8 +16,8 @@
import org.apache.tapestry.integration.app1.data.ToDoItem;
import org.apache.tapestry.integration.app1.data.Urgency;
+import org.apache.tapestry.ioc.internal.util.CollectionFactory;
import static org.apache.tapestry.ioc.internal.util.CollectionFactory.newList;
-import static org.apache.tapestry.ioc.internal.util.CollectionFactory.newMap;
import java.util.Collections;
import java.util.Comparator;
@@ -25,15 +25,14 @@
import java.util.Map;
/**
- * We clone everything that comes in or goes out. This does a reasonable job of simulating an
- * external database. We just use cloned copies of objects to represent data that's been marshalled
- * into tables and columns.
+ * We clone everything that comes in or goes out. This does a reasonable job of simulating an external database. We just
+ * use cloned copies of objects to represent data that's been marshalled into tables and columns.
*/
public class ToDoDatabaseImpl implements ToDoDatabase
{
- private long _nextId = 1000;
+ private long nextId = 1000;
- private final Map<Long, ToDoItem> _items = newMap();
+ private final Map<Long, ToDoItem> items = CollectionFactory.newMap();
public ToDoDatabaseImpl()
{
@@ -44,13 +43,13 @@
public void clear()
{
- _items.clear();
+ items.clear();
}
public void reset()
{
- _items.clear();
+ items.clear();
add("End World Hunger", Urgency.MEDIUM, 1);
add("Develop Faster-Than-Light Travel", Urgency.HIGH, 2);
@@ -70,18 +69,18 @@
public void add(ToDoItem item)
{
- long id = _nextId++;
+ long id = nextId++;
item.setId(id);
- _items.put(id, item.clone());
+ items.put(id, item.clone());
}
public List<ToDoItem> findAll()
{
List<ToDoItem> result = newList();
- for (ToDoItem item : _items.values())
+ for (ToDoItem item : items.values())
result.add(item.clone());
Comparator<ToDoItem> comparator = new Comparator<ToDoItem>()
@@ -101,15 +100,15 @@
{
long id = item.getId();
- if (!_items.containsKey(id))
+ if (!items.containsKey(id))
throw new RuntimeException(String.format("ToDoItem #%d not found.", id));
- _items.put(id, item.clone());
+ items.put(id, item.clone());
}
public void remove(long itemId)
{
- ToDoItem item = _items.remove(itemId);
+ ToDoItem item = items.remove(itemId);
if (item == null)
throw new RuntimeException(String.format("ToDoItem #%d not found.", itemId));
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app2/SimpleASO.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app2/SimpleASO.java?rev=655338&r1=655337&r2=655338&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app2/SimpleASO.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app2/SimpleASO.java Sun May 11 10:00:04 2008
@@ -16,15 +16,15 @@
public class SimpleASO
{
- private String _foo = "bar";
+ private String foo = "bar";
public void setFoo(String foo)
{
- _foo = foo;
+ this.foo = foo;
}
public String getFoo()
{
- return _foo;
+ return foo;
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app2/pages/TestPageForASO.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app2/pages/TestPageForASO.java?rev=655338&r1=655337&r2=655338&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app2/pages/TestPageForASO.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app2/pages/TestPageForASO.java Sun May 11 10:00:04 2008
@@ -20,10 +20,10 @@
public class TestPageForASO
{
@ApplicationState
- private SimpleASO _aso;
+ private SimpleASO aso;
public String getFooString()
{
- return _aso.getFoo();
+ return aso.getFoo();
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app2/pages/TestPageForAsset.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app2/pages/TestPageForAsset.java?rev=655338&r1=655337&r2=655338&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app2/pages/TestPageForAsset.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app2/pages/TestPageForAsset.java Sun May 11 10:00:04 2008
@@ -22,10 +22,10 @@
{
@Inject
@Path("context:css/test.css")
- private Asset _asset;
+ private Asset asset;
public String getStylePath()
{
- return _asset.toClientURL();
+ return asset.toClientURL();
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app2/pages/TestPageForLoop.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app2/pages/TestPageForLoop.java?rev=655338&r1=655337&r2=655338&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app2/pages/TestPageForLoop.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app2/pages/TestPageForLoop.java Sun May 11 10:00:04 2008
@@ -16,23 +16,23 @@
public class TestPageForLoop
{
- private String[] _array =
- {"x", "y", "z"};
+ private String[] array =
+ { "x", "y", "z" };
- private String _value;
+ private String value;
public String[] getArray()
{
- return _array;
+ return array;
}
public String getValue()
{
- return _value;
+ return value;
}
public void setValue(String value)
{
- this._value = value;
+ this.value = value;
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app2/pages/TestPrefixMethod.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app2/pages/TestPrefixMethod.java?rev=655338&r1=655337&r2=655338&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app2/pages/TestPrefixMethod.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app2/pages/TestPrefixMethod.java Sun May 11 10:00:04 2008
@@ -30,27 +30,27 @@
}
@Inject
- private ComponentResources _resources;
+ private ComponentResources resources;
@Inject
- private BeanModelSource _modelSource;
+ private BeanModelSource modelSource;
@InjectPage
- private TestPrefixMethod2 _otherPage;
+ private TestPrefixMethod2 otherPage;
private int foo;
@FortyTwo
public int getValue2()
{
- foo = _modelSource.hashCode();
+ foo = modelSource.hashCode();
return foo;
}
@PlusOne
public int getValue3()
{
- int value = _otherPage.hashCode();
+ int value = otherPage.hashCode();
return value * 0;
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app3/pages/Index.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app3/pages/Index.java?rev=655338&r1=655337&r2=655338&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app3/pages/Index.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app3/pages/Index.java Sun May 11 10:00:04 2008
@@ -14,22 +14,22 @@
package org.apache.tapestry.integration.app3.pages;
-import org.apache.tapestry.annotations.Property;
import org.apache.tapestry.annotations.InjectPage;
import org.apache.tapestry.annotations.Persist;
+import org.apache.tapestry.annotations.Property;
public class Index
{
@InjectPage
- private Login _login;
+ private Login login;
@Persist
@Property
- private String _message;
+ private String message;
boolean onActivate(String message)
{
- _message = message;
+ this.message = message;
// Terminate the event before it gets to the no-args onActivate().
@@ -40,6 +40,6 @@
{
// Perform a redirect to the login page.
- return _login;
+ return login;
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app3/pages/PropertyDisplayBlockOverrides.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app3/pages/PropertyDisplayBlockOverrides.java?rev=655338&r1=655337&r2=655338&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app3/pages/PropertyDisplayBlockOverrides.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app3/pages/PropertyDisplayBlockOverrides.java Sun May 11 10:00:04 2008
@@ -20,10 +20,10 @@
public class PropertyDisplayBlockOverrides
{
@Environmental
- private PropertyOutputContext _context;
+ private PropertyOutputContext context;
public PropertyOutputContext getContext()
{
- return _context;
+ return context;
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app4/pages/Destination.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app4/pages/Destination.java?rev=655338&r1=655337&r2=655338&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app4/pages/Destination.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app4/pages/Destination.java Sun May 11 10:00:04 2008
@@ -16,35 +16,35 @@
public class Destination
{
- private String _message;
+ private String message;
- private String _value;
+ private String value;
public String getMessage()
{
- return _message;
+ return message;
}
public String getValue()
{
- return _value;
+ return value;
}
public void setValue(String value)
{
- _value = value;
+ this.value = value;
}
String onPassivate()
{
- return _value;
+ return value;
}
void onActivate(String value)
{
addMessage("onActivate(String) invoked");
- _value = value;
+ this.value = value;
}
void onActivate()
@@ -54,13 +54,13 @@
private void addMessage(String text)
{
- if (_message == null)
+ if (message == null)
{
- _message = text;
+ message = text;
return;
}
- _message += " - " + text;
+ message += " - " + text;
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app4/pages/Start.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app4/pages/Start.java?rev=655338&r1=655337&r2=655338&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app4/pages/Start.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app4/pages/Start.java Sun May 11 10:00:04 2008
@@ -19,31 +19,31 @@
public class Start
{
@InjectPage
- private Destination _destination;
+ private Destination destination;
- private String _input;
+ private String input;
public String getInput()
{
- return _input;
+ return input;
}
public void setInput(String input)
{
- _input = input;
+ this.input = input;
}
Object onSuccess()
{
- _destination.setValue(_input);
+ destination.setValue(input);
- return _destination;
+ return destination;
}
Object onActionFromBypass()
{
- _destination.setValue("automatic value");
+ destination.setValue("automatic value");
- return _destination;
+ return destination;
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/pagelevel/ASOTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/pagelevel/ASOTest.java?rev=655338&r1=655337&r2=655338&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/pagelevel/ASOTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/pagelevel/ASOTest.java Sun May 11 10:00:04 2008
@@ -22,24 +22,24 @@
public class ASOTest extends Assert
{
- private PageTester _tester;
+ private PageTester tester;
@Test
public void submit_aso()
{
String appPackage = "org.apache.tapestry.integration.app2";
String appName = "";
- _tester = new PageTester(appPackage, appName);
- Document doc = _tester.renderPage("TestPageForASO");
+ tester = new PageTester(appPackage, appName);
+ Document doc = tester.renderPage("TestPageForASO");
assertTrue(doc.toString().contains("bar"));
}
@AfterMethod
public void after()
{
- if (_tester != null)
+ if (tester != null)
{
- _tester.shutdown();
+ tester.shutdown();
}
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/pagelevel/ActionLinkTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/pagelevel/ActionLinkTest.java?rev=655338&r1=655337&r2=655338&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/pagelevel/ActionLinkTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/pagelevel/ActionLinkTest.java Sun May 11 10:00:04 2008
@@ -1,48 +1,48 @@
-// Copyright 2006, 2007 The Apache Software Foundation
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
+// Copyright 2006, 2007 The Apache Software Foundation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
package org.apache.tapestry.integration.pagelevel;
-import org.apache.tapestry.dom.Document;
-import org.apache.tapestry.dom.Element;
-import org.apache.tapestry.test.PageTester;
-import org.testng.Assert;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.Test;
+import org.apache.tapestry.dom.Document;
+import org.apache.tapestry.dom.Element;
+import org.apache.tapestry.test.PageTester;
+import org.testng.Assert;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.Test;
public class ActionLinkTest extends Assert
{
- private PageTester _tester;
+ private PageTester tester;
@Test
public void click_link()
{
String appPackage = "org.apache.tapestry.integration.app2";
String appName = "";
- _tester = new PageTester(appPackage, appName);
- Document doc = _tester.renderPage("TestPageForActionLink");
+ tester = new PageTester(appPackage, appName);
+ Document doc = tester.renderPage("TestPageForActionLink");
Element link = doc.getElementById("link1");
- doc = _tester.clickLink(link);
+ doc = tester.clickLink(link);
assertTrue(doc.toString().contains("You chose: 123"));
}
- @AfterMethod
+ @AfterMethod
public void after()
{
- if (_tester != null)
+ if (tester != null)
{
- _tester.shutdown();
+ tester.shutdown();
}
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/pagelevel/AssetTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/pagelevel/AssetTest.java?rev=655338&r1=655337&r2=655338&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/pagelevel/AssetTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/pagelevel/AssetTest.java Sun May 11 10:00:04 2008
@@ -22,24 +22,24 @@
public class AssetTest extends Assert
{
- private PageTester _tester;
+ private PageTester tester;
@Test
public void submit_context_asset()
{
String appPackage = "org.apache.tapestry.integration.app2";
String appName = "";
- _tester = new PageTester(appPackage, appName, "src/test/app2");
- Document doc = _tester.renderPage("TestPageForAsset");
+ tester = new PageTester(appPackage, appName, "src/test/app2");
+ Document doc = tester.renderPage("TestPageForAsset");
assertTrue(doc.toString().contains("test.css"));
}
@AfterMethod
public void after()
{
- if (_tester != null)
+ if (tester != null)
{
- _tester.shutdown();
+ tester.shutdown();
}
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/pagelevel/FormTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/pagelevel/FormTest.java?rev=655338&r1=655337&r2=655338&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/pagelevel/FormTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/pagelevel/FormTest.java Sun May 11 10:00:04 2008
@@ -26,28 +26,28 @@
public class FormTest extends Assert
{
- private PageTester _tester;
+ private PageTester tester;
@Test
public void submit_form()
{
String appPackage = "org.apache.tapestry.integration.app2";
String appName = "";
- _tester = new PageTester(appPackage, appName);
- Document doc = _tester.renderPage("TestPageForForm");
+ tester = new PageTester(appPackage, appName);
+ Document doc = tester.renderPage("TestPageForForm");
Element form = doc.getElementById("form1");
Map<String, String> fieldValues = CollectionFactory.newMap();
fieldValues.put("t1", "hello");
- doc = _tester.submitForm(form, fieldValues);
+ doc = tester.submitForm(form, fieldValues);
assertTrue(doc.toString().contains("You entered: hello"));
}
@AfterMethod
public void after()
{
- if (_tester != null)
+ if (tester != null)
{
- _tester.shutdown();
+ tester.shutdown();
}
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/pagelevel/HeadTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/pagelevel/HeadTest.java?rev=655338&r1=655337&r2=655338&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/pagelevel/HeadTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/pagelevel/HeadTest.java Sun May 11 10:00:04 2008
@@ -22,24 +22,24 @@
public class HeadTest extends Assert
{
- private PageTester _tester;
+ private PageTester tester;
@Test
public void display()
{
String appPackage = "org.apache.tapestry.integration.app2";
String appName = "";
- _tester = new PageTester(appPackage, appName);
- Document doc = _tester.renderPage("TestPageForHead");
+ tester = new PageTester(appPackage, appName);
+ Document doc = tester.renderPage("TestPageForHead");
assertTrue(doc.toString().contains("OK"));
}
@AfterMethod
public void after()
{
- if (_tester != null)
+ if (tester != null)
{
- _tester.shutdown();
+ tester.shutdown();
}
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/pagelevel/IfTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/pagelevel/IfTest.java?rev=655338&r1=655337&r2=655338&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/pagelevel/IfTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/pagelevel/IfTest.java Sun May 11 10:00:04 2008
@@ -22,15 +22,15 @@
public class IfTest extends Assert
{
- private PageTester _tester;
+ private PageTester tester;
@Test
public void render()
{
String appPackage = "org.apache.tapestry.integration.app2";
String appName = "";
- _tester = new PageTester(appPackage, appName);
- Document doc = _tester.renderPage("TestPageForIf");
+ tester = new PageTester(appPackage, appName);
+ Document doc = tester.renderPage("TestPageForIf");
assertNotNull(doc.getElementById("1"));
assertNotNull(doc.getElementById("3"));
assertNotNull(doc.getElementById("5"));
@@ -44,9 +44,9 @@
@AfterMethod
public void after()
{
- if (_tester != null)
+ if (tester != null)
{
- _tester.shutdown();
+ tester.shutdown();
}
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/pagelevel/LocaleTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/pagelevel/LocaleTest.java?rev=655338&r1=655337&r2=655338&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/pagelevel/LocaleTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/pagelevel/LocaleTest.java Sun May 11 10:00:04 2008
@@ -25,38 +25,38 @@
public class LocaleTest extends Assert
{
- private PageTester _tester;
+ private PageTester tester;
@Test
public void no_preferred_language()
{
- Document doc = _tester.renderPage("TestPageForLocale");
+ Document doc = tester.renderPage("TestPageForLocale");
assertEquals(doc.getElementById("id1").getChildMarkup(), "English page");
}
@Test
public void prefer_canada_french()
{
- _tester.setPreferedLanguage(Locale.CANADA_FRENCH);
- Document doc = _tester.renderPage("TestPageForLocale");
+ tester.setPreferedLanguage(Locale.CANADA_FRENCH);
+ Document doc = tester.renderPage("TestPageForLocale");
assertEquals(doc.getElementById("id1").getChildMarkup(), "French page");
}
@Test
public void change_language_in_browser()
{
- Document doc = _tester.renderPage("TestPageForLocale");
+ Document doc = tester.renderPage("TestPageForLocale");
assertEquals(doc.getElementById("id1").getChildMarkup(), "English page");
- _tester.setPreferedLanguage(Locale.CANADA_FRENCH);
- doc = _tester.renderPage("TestPageForLocale");
+ tester.setPreferedLanguage(Locale.CANADA_FRENCH);
+ doc = tester.renderPage("TestPageForLocale");
assertEquals(doc.getElementById("id1").getChildMarkup(), "French page");
}
@Test
public void persist_locale()
{
- Document doc = _tester.renderPage("TestPageForLocale");
- doc = _tester.clickLink(doc.getElementById("changeLocale"));
+ Document doc = tester.renderPage("TestPageForLocale");
+ doc = tester.clickLink(doc.getElementById("changeLocale"));
assertEquals(doc.getElementById("id1").getChildMarkup(), "French page");
}
@@ -66,15 +66,15 @@
String appPackage = "org.apache.tapestry.integration.app2";
// LocaleAppModule.java has configured support for a certain locales.
String appName = "LocaleApp";
- _tester = new PageTester(appPackage, appName);
+ tester = new PageTester(appPackage, appName);
}
@AfterMethod
public void after()
{
- if (_tester != null)
+ if (tester != null)
{
- _tester.shutdown();
+ tester.shutdown();
}
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/pagelevel/LoopTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/pagelevel/LoopTest.java?rev=655338&r1=655337&r2=655338&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/pagelevel/LoopTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/pagelevel/LoopTest.java Sun May 11 10:00:04 2008
@@ -1,17 +1,17 @@
-// Copyright 2006, 2007 The Apache Software Foundation
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
+// Copyright 2006, 2007 The Apache Software Foundation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
package org.apache.tapestry.integration.pagelevel;
import org.apache.tapestry.dom.Document;
@@ -22,15 +22,15 @@
public class LoopTest extends Assert
{
- private PageTester _tester;
+ private PageTester tester;
@Test
public void render()
{
String appPackage = "org.apache.tapestry.integration.app2";
String appName = "";
- _tester = new PageTester(appPackage, appName);
- Document doc = _tester.renderPage("TestPageForLoop");
+ tester = new PageTester(appPackage, appName);
+ Document doc = tester.renderPage("TestPageForLoop");
assertTrue(doc.toString().contains("abcabcabc"));
assertEquals(doc.getElementById("1").getChildMarkup(), "xyz");
}
@@ -38,9 +38,9 @@
@AfterMethod
public void after()
{
- if (_tester != null)
+ if (tester != null)
{
- _tester.shutdown();
+ tester.shutdown();
}
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/pagelevel/PrefixMethodTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/pagelevel/PrefixMethodTest.java?rev=655338&r1=655337&r2=655338&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/pagelevel/PrefixMethodTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/pagelevel/PrefixMethodTest.java Sun May 11 10:00:04 2008
@@ -22,7 +22,7 @@
public class PrefixMethodTest extends Assert
{
- private PageTester _tester;
+ private PageTester tester;
@Test
public void prefix_method() throws Exception
@@ -30,15 +30,15 @@
// REFACTOR this happens in a bunch of places
String appPackage = "org.apache.tapestry.integration.app2";
String appName = "";
- _tester = new PageTester(appPackage, appName, PageTester.DEFAULT_CONTEXT_PATH, LocaleAppModule.class);
- Document doc = _tester.renderPage("TestPrefixMethod");
+ tester = new PageTester(appPackage, appName, PageTester.DEFAULT_CONTEXT_PATH, LocaleAppModule.class);
+ Document doc = tester.renderPage("TestPrefixMethod");
// make sure you can use on methods that have injected fields
assertEquals(doc.getElementById("value2").getChildMarkup(), "42");
assertEquals(doc.getElementById("value3").getChildMarkup(), "1");
// should override the method in the superclass
- doc = _tester.renderPage("TestPrefixMethod2");
+ doc = tester.renderPage("TestPrefixMethod2");
assertEquals(doc.getElementById("value").getChildMarkup(), "42");
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/pagelevel/SubmitTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/pagelevel/SubmitTest.java?rev=655338&r1=655337&r2=655338&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/pagelevel/SubmitTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/pagelevel/SubmitTest.java Sun May 11 10:00:04 2008
@@ -27,42 +27,42 @@
public class SubmitTest extends Assert
{
- private PageTester _tester;
+ private PageTester tester;
- private Document _doc;
+ private Document doc;
- private Map<String, String> _fieldValues;
+ private Map<String, String> fieldValues;
@Test
public void submit_form()
{
- Element submitButton = _doc.getElementById("capitalize1");
- _fieldValues.put("t1", "hello");
- _doc = _tester.clickSubmit(submitButton, _fieldValues);
- assertTrue(_doc.toString().contains("Value is: HELLO"));
+ Element submitButton = doc.getElementById("capitalize1");
+ fieldValues.put("t1", "hello");
+ doc = tester.clickSubmit(submitButton, fieldValues);
+ assertTrue(doc.toString().contains("Value is: HELLO"));
}
@Test
public void access_following_fields()
{
- Element submitButton = _doc.getElementById("capitalize2");
- _fieldValues.put("t2", "world");
- _doc = _tester.clickSubmit(submitButton, _fieldValues);
- assertTrue(_doc.toString().contains("Value is: WORLD"));
+ Element submitButton = doc.getElementById("capitalize2");
+ fieldValues.put("t2", "world");
+ doc = tester.clickSubmit(submitButton, fieldValues);
+ assertTrue(doc.toString().contains("Value is: WORLD"));
}
@Test(expectedExceptions = IllegalArgumentException.class)
public void not_a_submit()
{
- Element submitButton = _doc.getElementById("t1");
- _tester.clickSubmit(submitButton, _fieldValues);
+ Element submitButton = doc.getElementById("t1");
+ tester.clickSubmit(submitButton, fieldValues);
}
@Test(expectedExceptions = IllegalArgumentException.class)
public void not_in_form()
{
- Element submitButton = _doc.getElementById("orphanedSubmit");
- _tester.clickSubmit(submitButton, _fieldValues);
+ Element submitButton = doc.getElementById("orphanedSubmit");
+ tester.clickSubmit(submitButton, fieldValues);
}
@BeforeMethod
@@ -70,17 +70,17 @@
{
String appPackage = "org.apache.tapestry.integration.app2";
String appName = "";
- _tester = new PageTester(appPackage, appName);
- _doc = _tester.renderPage("TestPageForSubmit");
- _fieldValues = CollectionFactory.newMap();
+ tester = new PageTester(appPackage, appName);
+ doc = tester.renderPage("TestPageForSubmit");
+ fieldValues = CollectionFactory.newMap();
}
@AfterMethod
public void after()
{
- if (_tester != null)
+ if (tester != null)
{
- _tester.shutdown();
+ tester.shutdown();
}
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/pagelevel/TemplateInContextTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/pagelevel/TemplateInContextTest.java?rev=655338&r1=655337&r2=655338&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/pagelevel/TemplateInContextTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/pagelevel/TemplateInContextTest.java Sun May 11 10:00:04 2008
@@ -22,24 +22,24 @@
public class TemplateInContextTest extends Assert
{
- private PageTester _tester;
+ private PageTester tester;
@Test
public void template_in_web_context()
{
String appPackage = "org.apache.tapestry.integration.app2";
String appName = "";
- _tester = new PageTester(appPackage, appName, "src/test/app2");
- Document doc = _tester.renderPage("TestPageForTemplateInContext");
+ tester = new PageTester(appPackage, appName, "src/test/app2");
+ Document doc = tester.renderPage("TestPageForTemplateInContext");
assertTrue(doc.toString().contains("How are you?"));
}
@AfterMethod
public void after()
{
- if (_tester != null)
+ if (tester != null)
{
- _tester.shutdown();
+ tester.shutdown();
}
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/pagelevel/UnlessTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/pagelevel/UnlessTest.java?rev=655338&r1=655337&r2=655338&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/pagelevel/UnlessTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/pagelevel/UnlessTest.java Sun May 11 10:00:04 2008
@@ -14,23 +14,23 @@
package org.apache.tapestry.integration.pagelevel;
+import org.apache.tapestry.dom.Document;
+import org.apache.tapestry.test.PageTester;
import org.testng.Assert;
-import org.testng.annotations.Test;
import org.testng.annotations.AfterMethod;
-import org.apache.tapestry.test.PageTester;
-import org.apache.tapestry.dom.Document;
+import org.testng.annotations.Test;
public class UnlessTest extends Assert
{
- private PageTester _tester;
+ private PageTester tester;
@Test
public void render()
{
String appPackage = "org.apache.tapestry.integration.app2";
String appName = "";
- _tester = new PageTester(appPackage, appName);
- Document doc = _tester.renderPage("TestPageForUnless");
+ tester = new PageTester(appPackage, appName);
+ Document doc = tester.renderPage("TestPageForUnless");
assertNotNull(doc.getElementById("2"));
assertNotNull(doc.getElementById("4"));
assertNotNull(doc.getElementById("6"));
@@ -44,9 +44,9 @@
@AfterMethod
public void after()
{
- if (_tester != null)
+ if (tester != null)
{
- _tester.shutdown();
+ tester.shutdown();
}
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/DataBean.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/DataBean.java?rev=655338&r1=655337&r2=655338&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/DataBean.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/DataBean.java Sun May 11 10:00:04 2008
@@ -17,44 +17,44 @@
import org.apache.tapestry.ioc.services.ClassFactory;
/**
- * Used as test when setting the order of properties via
- * {@link TapestryInternalUtils#orderProperties(org.apache.tapestry.ioc.services.ClassPropertyAdapter, ClassFactory, java.util.List)}.
+ * Used as test when setting the order of properties via {@link TapestryInternalUtils#orderProperties(org.apache.tapestry.ioc.services.ClassPropertyAdapter,
+ * ClassFactory, java.util.List)}.
*/
public class DataBean
{
- private String _firstName;
+ private String firstName;
- private String _lastName;
+ private String lastName;
- private int _age;
+ private int age;
public String getFirstName()
{
- return _firstName;
+ return firstName;
}
public String getLastName()
{
- return _lastName;
+ return lastName;
}
public int getAge()
{
- return _age;
+ return age;
}
public void setAge(int age)
{
- _age = age;
+ this.age = age;
}
public void setFirstName(String firstName)
{
- _firstName = firstName;
+ this.firstName = firstName;
}
public void setLastName(String lastName)
{
- _lastName = lastName;
+ this.lastName = lastName;
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/DataBeanSubclass.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/DataBeanSubclass.java?rev=655338&r1=655337&r2=655338&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/DataBeanSubclass.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/DataBeanSubclass.java Sun May 11 10:00:04 2008
@@ -16,52 +16,52 @@
public class DataBeanSubclass extends DataBean
{
- private String _street;
+ private String street;
- private String _city;
+ private String city;
- private String _state;
+ private String state;
- private String _zip;
+ private String zip;
public String getStreet()
{
- return _street;
+ return street;
}
public String getCity()
{
- return _city;
+ return city;
}
public String getState()
{
- return _state;
+ return state;
}
public String getZip()
{
- return _zip;
+ return zip;
}
public void setCity(String city)
{
- _city = city;
+ this.city = city;
}
public void setStreet(String street)
{
- _street = street;
+ this.street = street;
}
public void setState(String state)
{
- _state = state;
+ this.state = state;
}
public void setZip(String zip)
{
- _zip = zip;
+ this.zip = zip;
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/PropertyOrderBean.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/PropertyOrderBean.java?rev=655338&r1=655337&r2=655338&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/PropertyOrderBean.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/PropertyOrderBean.java Sun May 11 10:00:04 2008
@@ -18,40 +18,40 @@
public class PropertyOrderBean
{
- private String _first;
+ private String first;
- private String _second;
+ private String second;
- private String _third;
+ private String third;
public String getFirst()
{
- return _first;
+ return first;
}
public String getSecond()
{
- return _second;
+ return second;
}
@OrderBefore("first")
public String getThird()
{
- return _third;
+ return third;
}
public void setFirst(String first)
{
- _first = first;
+ this.first = first;
}
public void setSecond(String second)
{
- _second = second;
+ this.second = second;
}
public void setThird(String third)
{
- _third = third;
+ this.third = third;
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/SingleKeySymbolProviderTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/SingleKeySymbolProviderTest.java?rev=655338&r1=655337&r2=655338&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/SingleKeySymbolProviderTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/SingleKeySymbolProviderTest.java Sun May 11 10:00:04 2008
@@ -20,23 +20,23 @@
public class SingleKeySymbolProviderTest extends Assert
{
- private final SymbolProvider _provider = new SingleKeySymbolProvider("fred", "flintstone");
+ private final SymbolProvider provider = new SingleKeySymbolProvider("fred", "flintstone");
@Test
public void exact_match()
{
- assertEquals(_provider.valueForSymbol("fred"), "flintstone");
+ assertEquals(provider.valueForSymbol("fred"), "flintstone");
}
@Test
public void case_insensitive()
{
- assertEquals(_provider.valueForSymbol("FRED"), "flintstone");
+ assertEquals(provider.valueForSymbol("FRED"), "flintstone");
}
@Test
public void non_match()
{
- assertNull(_provider.valueForSymbol("barney"));
+ assertNull(provider.valueForSymbol("barney"));
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/TapestryInternalUtilsTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/TapestryInternalUtilsTest.java?rev=655338&r1=655337&r2=655338&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/TapestryInternalUtilsTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/TapestryInternalUtilsTest.java Sun May 11 10:00:04 2008
@@ -35,22 +35,22 @@
public class TapestryInternalUtilsTest extends InternalBaseTestCase
{
- private ClassFactory _classFactory;
+ private ClassFactory classFactory;
- private PropertyAccess _access;
+ private PropertyAccess access;
@BeforeClass
public void setup()
{
- _classFactory = getService("ClassFactory", ClassFactory.class);
- _access = getService("PropertyAccess", PropertyAccess.class);
+ classFactory = getService("ClassFactory", ClassFactory.class);
+ access = getService("PropertyAccess", PropertyAccess.class);
}
@AfterClass
public void cleanup()
{
- _access = null;
- _classFactory = null;
+ access = null;
+ classFactory = null;
}
@@ -297,13 +297,13 @@
@Test
public void property_order_basic()
{
- ClassPropertyAdapter adapter = _access.getAdapter(DataBean.class);
+ ClassPropertyAdapter adapter = access.getAdapter(DataBean.class);
List<String> names = adapter.getPropertyNames();
names.remove("class");
- List<String> sorted = TapestryInternalUtils.orderProperties(null, adapter, _classFactory, names);
+ List<String> sorted = TapestryInternalUtils.orderProperties(null, adapter, classFactory, names);
assertEquals(sorted, Arrays.asList("firstName", "lastName", "age"));
}
@@ -311,13 +311,13 @@
@Test
public void property_order_on_subclass()
{
- ClassPropertyAdapter adapter = _access.getAdapter(DataBeanSubclass.class);
+ ClassPropertyAdapter adapter = access.getAdapter(DataBeanSubclass.class);
List<String> names = adapter.getPropertyNames();
names.remove("class");
- List<String> sorted = TapestryInternalUtils.orderProperties(null, adapter, _classFactory, names);
+ List<String> sorted = TapestryInternalUtils.orderProperties(null, adapter, classFactory, names);
// Subclass properties listed after superclass properties, as desired.
@@ -327,13 +327,13 @@
@Test
public void properties_with_order_annotation_filtered()
{
- ClassPropertyAdapter adapter = _access.getAdapter(PropertyOrderBean.class);
+ ClassPropertyAdapter adapter = access.getAdapter(PropertyOrderBean.class);
List<String> names = adapter.getPropertyNames();
names.remove("class");
- List<String> sorted = TapestryInternalUtils.orderProperties(null, adapter, _classFactory, names);
+ List<String> sorted = TapestryInternalUtils.orderProperties(null, adapter, classFactory, names);
// Property third has an explicit @OrderBefore
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/bindings/PropBindingFactoryTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/bindings/PropBindingFactoryTest.java?rev=655338&r1=655337&r2=655338&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/bindings/PropBindingFactoryTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/bindings/PropBindingFactoryTest.java Sun May 11 10:00:04 2008
@@ -33,18 +33,18 @@
public class PropBindingFactoryTest extends InternalBaseTestCase
{
- private BindingFactory _factory;
+ private BindingFactory factory;
@BeforeClass
public void setup_factory()
{
- _factory = getService("PropBindingFactory", BindingFactory.class);
+ factory = getService("PropBindingFactory", BindingFactory.class);
}
@AfterClass
public void cleanup_factory()
{
- _factory = null;
+ factory = null;
}
private ComponentResources newComponentResources(Component component)
@@ -66,7 +66,7 @@
replay();
- Binding binding = _factory.newBinding("test binding", resources, null, "objectValue", l);
+ Binding binding = factory.newBinding("test binding", resources, null, "objectValue", l);
assertSame(binding.getBindingType(), String.class);
@@ -93,7 +93,7 @@
replay();
- Binding binding = _factory.newBinding("test binding", resources, null, "readOnly", l);
+ Binding binding = factory.newBinding("test binding", resources, null, "readOnly", l);
assertEquals(binding.getAnnotation(OrderBefore.class).value(), "writeOnly");
@@ -109,7 +109,7 @@
replay();
- Binding binding = _factory.newBinding("test binding", resources, null, "writeOnly", l);
+ Binding binding = factory.newBinding("test binding", resources, null, "writeOnly", l);
assertEquals(binding.getAnnotation(OrderAfter.class).value(), "foobar");
@@ -125,7 +125,7 @@
replay();
- Binding binding = _factory.newBinding("test binding", resources, null, "intValue", l);
+ Binding binding = factory.newBinding("test binding", resources, null, "intValue", l);
assertNull(binding.getAnnotation(OrderBefore.class));
@@ -141,7 +141,7 @@
replay();
- Binding binding = _factory.newBinding(
+ Binding binding = factory.newBinding(
"test binding",
resources,
null,
@@ -162,7 +162,7 @@
replay();
- Binding binding = _factory.newBinding("test binding", resources, null, "objectValue", l);
+ Binding binding = factory.newBinding("test binding", resources, null, "objectValue", l);
assertEquals(binding.getAnnotation(OrderAfter.class).value(), "readOnly");
@@ -178,7 +178,7 @@
replay();
- Binding binding = _factory.newBinding(
+ Binding binding = factory.newBinding(
"test binding",
resources,
null,
@@ -214,7 +214,7 @@
replay();
- Binding binding = _factory.newBinding(
+ Binding binding = factory.newBinding(
"test binding",
resources,
null,
@@ -243,7 +243,7 @@
replay();
- Binding binding = _factory.newBinding(
+ Binding binding = factory.newBinding(
"test binding",
resources,
null,
@@ -286,7 +286,7 @@
try
{
- _factory.newBinding("test binding", resources, null, "isThatRealBlood().value", l);
+ factory.newBinding("test binding", resources, null, "isThatRealBlood().value", l);
unreachable();
}
catch (RuntimeException ex)
@@ -312,7 +312,7 @@
try
{
- _factory.newBinding(
+ factory.newBinding(
"test binding",
resources,
null,
@@ -343,7 +343,7 @@
try
{
- _factory.newBinding("test binding", resources, null, "voidMethod().value", l);
+ factory.newBinding("test binding", resources, null, "voidMethod().value", l);
unreachable();
}
catch (RuntimeException ex)
@@ -369,7 +369,7 @@
try
{
- _factory.newBinding("test binding", resources, null, "stringHolder.voidMethod()", l);
+ factory.newBinding("test binding", resources, null, "stringHolder.voidMethod()", l);
unreachable();
}
catch (RuntimeException ex)
@@ -397,7 +397,7 @@
try
{
- _factory.newBinding("test binding", resources, null, propertyPath, l);
+ factory.newBinding("test binding", resources, null, propertyPath, l);
unreachable();
}
catch (TapestryException ex)
@@ -427,7 +427,7 @@
try
{
- _factory.newBinding("test binding", resources, null, propertyPath, l);
+ factory.newBinding("test binding", resources, null, propertyPath, l);
unreachable();
}
catch (TapestryException ex)
@@ -451,7 +451,7 @@
replay();
- Binding binding = _factory.newBinding("test binding", resources, null, "intValue", l);
+ Binding binding = factory.newBinding("test binding", resources, null, "intValue", l);
assertSame(binding.getBindingType(), int.class);
@@ -475,7 +475,7 @@
replay();
- Binding binding = _factory.newBinding("test binding", resources, null, "readOnly", l);
+ Binding binding = factory.newBinding("test binding", resources, null, "readOnly", l);
assertEquals(binding.get(), "ReadOnly");
@@ -504,11 +504,11 @@
replay();
- Binding binding = _factory.newBinding("test binding", resources, null, "writeOnly", l);
+ Binding binding = factory.newBinding("test binding", resources, null, "writeOnly", l);
binding.set("updated");
- assertEquals(bean._writeOnly, "updated");
+ assertEquals(bean.writeOnly, "updated");
try
{
@@ -539,7 +539,7 @@
try
{
- _factory.newBinding("test binding", resources, null, "missingProperty", l);
+ factory.newBinding("test binding", resources, null, "missingProperty", l);
unreachable();
}
catch (TapestryException ex)
@@ -567,7 +567,7 @@
replay();
- Binding binding = _factory.newBinding(description, resources, null, "this", l);
+ Binding binding = factory.newBinding(description, resources, null, "this", l);
assertSame(binding.get(), component);
@@ -583,7 +583,7 @@
replay();
- Binding binding = _factory.newBinding(description, resources, null, expression, l);
+ Binding binding = factory.newBinding(description, resources, null, expression, l);
assertEquals(binding.get(), expected);
@@ -595,26 +595,26 @@
{
return new Object[][]
{
- {"true", true,},
- {"True", true,},
- {" true ", true,},
- {"false", false},
- {"null", null},
- {"3", 3l},
- {" 37 ", 37l},
- {" -227", -227l},
- {" 5.", 5d},
- {" -100.", -100d},
- {" -0.0 ", -0d},
- {"1..10", new IntegerRange(1, 10)},
- {" -20 .. -30 ", new IntegerRange(-20, -30)},
- {"0.", 0d},
- {" 227.75", 227.75d},
- {" -10123.67", -10123.67d},
- {"'Hello World'", "Hello World"},
- {" 'Whitespace Ignored' ", "Whitespace Ignored"},
- {" ' Inside ' ", " Inside "},
- {" 'Nested ' Quotes ' Inside'", "Nested ' Quotes ' Inside"},
- {"'''", "'"}};
+ { "true", true, },
+ { "True", true, },
+ { " true ", true, },
+ { "false", false },
+ { "null", null },
+ { "3", 3l },
+ { " 37 ", 37l },
+ { " -227", -227l },
+ { " 5.", 5d },
+ { " -100.", -100d },
+ { " -0.0 ", -0d },
+ { "1..10", new IntegerRange(1, 10) },
+ { " -20 .. -30 ", new IntegerRange(-20, -30) },
+ { "0.", 0d },
+ { " 227.75", 227.75d },
+ { " -10123.67", -10123.67d },
+ { "'Hello World'", "Hello World" },
+ { " 'Whitespace Ignored' ", "Whitespace Ignored" },
+ { " ' Inside ' ", " Inside " },
+ { " 'Nested ' Quotes ' Inside'", "Nested ' Quotes ' Inside" },
+ { "'''", "'" } };
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/bindings/StringHolderImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/bindings/StringHolderImpl.java?rev=655338&r1=655337&r2=655338&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/bindings/StringHolderImpl.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/bindings/StringHolderImpl.java Sun May 11 10:00:04 2008
@@ -16,21 +16,21 @@
public class StringHolderImpl implements StringHolder
{
- private String _value;
+ private String value;
public String getValue()
{
- return _value;
+ return value;
}
public void setValue(String value)
{
- _value = value;
+ this.value = value;
}
public String stringValue()
{
- return _value;
+ return value;
}
public void voidMethod()
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/bindings/TargetBean.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/bindings/TargetBean.java?rev=655338&r1=655337&r2=655338&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/bindings/TargetBean.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/bindings/TargetBean.java Sun May 11 10:00:04 2008
@@ -20,23 +20,23 @@
public class TargetBean extends DefaultComponent
{
- private String _objectValue;
+ private String objectValue;
- private int _intValue;
+ private int intValue;
- String _writeOnly;
+ String writeOnly;
- private StringHolder _stringHolder = new StringHolderImpl();
+ private StringHolder stringHolder = new StringHolderImpl();
public StringHolder getStringHolder()
{
- return _stringHolder;
+ return stringHolder;
}
@BeforeRenderBody
public StringHolder stringHolderMethod()
{
- return _stringHolder;
+ return stringHolder;
}
public void voidMethod()
@@ -46,30 +46,30 @@
public int getIntValue()
{
- return _intValue;
+ return intValue;
}
public void setIntValue(int intValue)
{
- _intValue = intValue;
+ this.intValue = intValue;
}
@OrderAfter("readOnly")
public String getObjectValue()
{
- return _objectValue;
+ return objectValue;
}
@OrderAfter("writeOnly")
public void setObjectValue(String objectValue)
{
- _objectValue = objectValue;
+ this.objectValue = objectValue;
}
@OrderAfter("foobar")
public void setWriteOnly(String value)
{
- _writeOnly = value;
+ writeOnly = value;
}
@OrderBefore("writeOnly")
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/grid/CollectionGridDataSourceTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/grid/CollectionGridDataSourceTest.java?rev=655338&r1=655337&r2=655338&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/grid/CollectionGridDataSourceTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/grid/CollectionGridDataSourceTest.java Sun May 11 10:00:04 2008
@@ -44,12 +44,12 @@
// Arrays.asList returns an unmodifiable list
- private final List _raw = Arrays.asList(new Datum(FRED, "Fred"), new Datum(BARNEY, "Barney"),
- new Datum(WILMA, "Wilma"), new Datum(BETTY, null));
+ private final List raw = Arrays.asList(new Datum(FRED, "Fred"), new Datum(BARNEY, "Barney"),
+ new Datum(WILMA, "Wilma"), new Datum(BETTY, null));
- private final CollectionGridDataSource _source = new CollectionGridDataSource(_raw);
+ private final CollectionGridDataSource source = new CollectionGridDataSource(raw);
- private BeanModel _model;
+ private BeanModel model;
@BeforeClass
public void setup()
@@ -64,7 +64,7 @@
replay();
- _model = source.create(Datum.class, false, resources);
+ model = source.create(Datum.class, false, resources);
verify();
}
@@ -72,7 +72,7 @@
@AfterClass
public void cleanup()
{
- _model = null;
+ model = null;
}
@Test
@@ -106,18 +106,19 @@
private void sort(String propertyName, boolean ascending, int... ids)
{
- PropertyModel propertyModel = _model.get(propertyName);
+ PropertyModel propertyModel = model.get(propertyName);
- int availableRows = _source.getAvailableRows();
+ int availableRows = source.getAvailableRows();
- SortConstraint constraint = new SortConstraint(propertyModel, ascending ? ColumnSort.ASCENDING : ColumnSort.DESCENDING);
+ SortConstraint constraint = new SortConstraint(propertyModel,
+ ascending ? ColumnSort.ASCENDING : ColumnSort.DESCENDING);
List<SortConstraint> constraints = Collections.singletonList(constraint);
- _source.prepare(0, availableRows - 1, constraints);
+ source.prepare(0, availableRows - 1, constraints);
for (int i = 0; i < ids.length; i++)
{
- Datum row = (Datum) _source.getRowValue(i);
+ Datum row = (Datum) source.getRowValue(i);
assertEquals(row.getId(), ids[i], "Id for Datum #" + i);
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/grid/Datum.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/grid/Datum.java?rev=655338&r1=655337&r2=655338&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/grid/Datum.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/grid/Datum.java Sun May 11 10:00:04 2008
@@ -16,23 +16,23 @@
public class Datum
{
- private final int _id;
+ private final int id;
- private final String _value;
+ private final String value;
public Datum(final int id, final String value)
{
- _id = id;
- _value = value;
+ this.id = id;
+ this.value = value;
}
public int getId()
{
- return _id;
+ return id;
}
public String getValue()
{
- return _value;
+ return value;
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/AliasImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/AliasImplTest.java?rev=655338&r1=655337&r2=655338&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/AliasImplTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/AliasImplTest.java Sun May 11 10:00:04 2008
@@ -28,7 +28,7 @@
public class AliasImplTest extends InternalBaseTestCase
{
- private Map<Class, Object> _emptyMap = Collections.emptyMap();
+ private Map<Class, Object> emptyMap = Collections.emptyMap();
protected final AliasManager newAliasManager()
{
@@ -51,7 +51,7 @@
configuration.put(Runnable.class, r);
train_getAliasesForMode(manager, mode, configuration);
- train_getAliasesForMode(overridesManager, mode, _emptyMap);
+ train_getAliasesForMode(overridesManager, mode, emptyMap);
replay();
@@ -120,8 +120,8 @@
ObjectLocator locator = mockObjectLocator();
- train_getAliasesForMode(manager, mode, _emptyMap);
- train_getAliasesForMode(overridesManager, mode, _emptyMap);
+ train_getAliasesForMode(manager, mode, emptyMap);
+ train_getAliasesForMode(overridesManager, mode, emptyMap);
replay();
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/AssetSourceImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/AssetSourceImplTest.java?rev=655338&r1=655337&r2=655338&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/AssetSourceImplTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/AssetSourceImplTest.java Sun May 11 10:00:04 2008
@@ -29,10 +29,10 @@
public class AssetSourceImplTest extends InternalBaseTestCase
{
- private final Resource _baseResource = new ClasspathResource(
+ private final Resource baseResource = new ClasspathResource(
"org/apache/tapestry/internal/services/SimpleComponent.class");
- private final Resource _rootResource = new ClasspathResource("/");
+ private final Resource rootResource = new ClasspathResource("/");
@Test
public void relative_asset()
@@ -41,9 +41,9 @@
ThreadLocale threadLocale = mockThreadLocale();
Asset asset = mockAsset();
- Resource expectedResource = _baseResource.forFile("SimpleComponent_en_GB.properties");
+ Resource expectedResource = baseResource.forFile("SimpleComponent_en_GB.properties");
- train_getRootResource(factory, _rootResource);
+ train_getRootResource(factory, rootResource);
train_createAsset(factory, expectedResource, asset);
@@ -55,11 +55,11 @@
// First try creates it:
- assertSame(source.getAsset(_baseResource, "SimpleComponent.properties", Locale.UK), asset);
+ assertSame(source.getAsset(baseResource, "SimpleComponent.properties", Locale.UK), asset);
// Second try shows that it is cached
- assertSame(source.getAsset(_baseResource, "SimpleComponent.properties", Locale.UK), asset);
+ assertSame(source.getAsset(baseResource, "SimpleComponent.properties", Locale.UK), asset);
verify();
}
@@ -71,9 +71,9 @@
ThreadLocale threadLocale = mockThreadLocale();
Asset asset = mockAsset();
- Resource expectedResource = _baseResource.forFile("SimpleComponent_en_GB.properties");
+ Resource expectedResource = baseResource.forFile("SimpleComponent_en_GB.properties");
- train_getRootResource(factory, _rootResource);
+ train_getRootResource(factory, rootResource);
train_createAsset(factory, expectedResource, asset);
@@ -100,9 +100,9 @@
Asset asset = mockAsset();
Locale locale = Locale.UK;
- Resource expectedResource = _baseResource.forFile("SimpleComponent_en_GB.properties");
+ Resource expectedResource = baseResource.forFile("SimpleComponent_en_GB.properties");
- train_getRootResource(factory, _rootResource);
+ train_getRootResource(factory, rootResource);
train_createAsset(factory, expectedResource, asset);
@@ -129,10 +129,10 @@
ThreadLocale threadLocale = mockThreadLocale();
Asset asset = mockAsset();
- Resource expectedResource = _rootResource
+ Resource expectedResource = rootResource
.forFile("org/apache/tapestry/internal/services/SimpleComponent_en_GB.properties");
- train_getRootResource(factory, _rootResource);
+ train_getRootResource(factory, rootResource);
train_createAsset(factory, expectedResource, asset);
@@ -143,14 +143,14 @@
AssetSource source = new AssetSourceImpl(threadLocale, configuration);
assertSame(source.getAsset(
- _baseResource,
+ baseResource,
"classpath:org/apache/tapestry/internal/services/SimpleComponent.properties",
Locale.UK), asset);
// Check that a leading slash is not a problem:
assertSame(source.getAsset(
- _baseResource,
+ baseResource,
"classpath:/org/apache/tapestry/internal/services/SimpleComponent.properties",
Locale.UK), asset);
@@ -171,7 +171,7 @@
try
{
source.getAsset(
- _baseResource,
+ baseResource,
"classpath:org/apache/tapestry/internal/services/SimpleComponent.properties",
Locale.UK);
unreachable();
@@ -199,7 +199,7 @@
try
{
- source.getAsset(_baseResource, "DoesNotExist.properties", Locale.UK);
+ source.getAsset(baseResource, "DoesNotExist.properties", Locale.UK);
unreachable();
}
catch (RuntimeException ex)