[ductilej] push by rc...@opiumtrail.com - Added new test case under "dtests": ConstructorArgsTest verifies that ... on 2010-07-05 19:10 GMT

0 views
Skip to first unread message

duct...@googlecode.com

unread,
Jul 5, 2010, 3:10:52 PM7/5/10
to ductil...@googlegroups.com
Revision: ef856dc35c
Author: Richard Cook <rc...@opiumtrail.com>
Date: Mon Jul 5 12:09:37 2010
Log: Added new test case under "dtests": ConstructorArgsTest verifies that
constructor argument lists and passed parameters are correctly detyped
(which they currently don't seem to be)
http://code.google.com/p/ductilej/source/detail?r=ef856dc35c

Added:
/src/org/ductilej/dtests/ConstructorArgsTest.java

=======================================
--- /dev/null
+++ /src/org/ductilej/dtests/ConstructorArgsTest.java Mon Jul 5 12:09:37
2010
@@ -0,0 +1,25 @@
+//
+// $Id$
+
+package org.ductilej.dtests;
+
+import java.util.Date;
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+/**
+ * Tests that we can pass non-matching arguments to constructor.
+ */
+public class ConstructorArgsTest
+{
+ static class Foo {
+ public Foo(String arg0, String arg1, String arg2, Date arg3) {
+ }
+ }
+
+ @Test(expected=NoSuchMethodError.class)
+ public void testNonmatchingArgs() {
+ Foo f = new Foo("", "", "", "");
+ }
+}
+

Reply all
Reply to author
Forward
0 new messages