[Japi-cvs] SF.net SVN: japi:[871] libs/swing-action/trunk/src/tst/test/net/sf/japi/ swing/Reflecti
Status: Beta
Brought to you by:
christianhujer
|
From: <chr...@us...> - 2009-02-15 12:12:34
|
Revision: 871
http://japi.svn.sourceforge.net/japi/?rev=871&view=rev
Author: christianhujer
Date: 2009-02-15 11:58:56 +0000 (Sun, 15 Feb 2009)
Log Message:
-----------
Improved Unit tests, e.g. add messages, bring expected and actual in right order, use assertEquals.
Modified Paths:
--------------
libs/swing-action/trunk/src/tst/test/net/sf/japi/swing/ReflectionActionTest.java
Modified: libs/swing-action/trunk/src/tst/test/net/sf/japi/swing/ReflectionActionTest.java
===================================================================
--- libs/swing-action/trunk/src/tst/test/net/sf/japi/swing/ReflectionActionTest.java 2009-02-15 11:58:45 UTC (rev 870)
+++ libs/swing-action/trunk/src/tst/test/net/sf/japi/swing/ReflectionActionTest.java 2009-02-15 11:58:56 UTC (rev 871)
@@ -95,7 +95,7 @@
@Test
public void testPutValueMethodName() throws Exception {
testling.putValue(ReflectionAction.REFLECTION_METHOD_NAME, "foo");
- Assert.assertEquals("After setting the method name method name must be stored.", testling.getValue(ReflectionAction.REFLECTION_METHOD_NAME), "foo");
+ Assert.assertEquals("After setting the method name method name must be stored.", "foo", testling.getValue(ReflectionAction.REFLECTION_METHOD_NAME));
Assert.assertNull("After setting the method name method must be null.", testling.getValue(ReflectionAction.REFLECTION_METHOD));
}
@@ -137,7 +137,7 @@
testling.putValue(ReflectionAction.REFLECTION_METHOD, actionMock.getMethod());
testling.putValue(ReflectionAction.REFLECTION_TARGET, null);
Assert.assertNull("After setting REFLECTION_TARGET to null, REFLECTION_METHOD must be reset to null.", testling.getValue(ReflectionAction.REFLECTION_METHOD));
- Assert.assertEquals("After setting REFLECTION_TARGET to null, REFLECTION_METHOD_NAME must be unchanged.", testling.getValue(ReflectionAction.REFLECTION_METHOD_NAME), "foo");
+ Assert.assertEquals("After setting REFLECTION_TARGET to null, REFLECTION_METHOD_NAME must be unchanged.", "foo", testling.getValue(ReflectionAction.REFLECTION_METHOD_NAME));
}
/**
@@ -149,7 +149,7 @@
testling.putValue(ReflectionAction.REFLECTION_TARGET, actionMock);
testling.putValue(ReflectionAction.REFLECTION_METHOD_NAME, "someAction");
testling.actionPerformed(new ActionEvent(this, 0, null));
- Assert.assertEquals("actionPerformed() must lead to the target method being invoked exactly once.", actionMock.getInvocationCount(), 1);
+ Assert.assertEquals("actionPerformed() must lead to the target method being invoked exactly once.", 1, actionMock.getInvocationCount());
}
/**
@@ -162,7 +162,7 @@
testling.putValue(ReflectionAction.REFLECTION_TARGET, actionMock);
testling.putValue(ReflectionAction.REFLECTION_METHOD_NAME, "someAction");
testling.actionPerformed(new ActionEvent(this, 0, null));
- Assert.assertEquals("actionPerformed() must lead to the target method being invoked exactly once.", actionMock.getInvocationCount(), 1);
+ Assert.assertEquals("actionPerformed() must lead to the target method being invoked exactly once.", 1, actionMock.getInvocationCount());
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|