You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by jc...@apache.org on 2005/08/25 01:04:38 UTC

svn commit: r239960 - in /jakarta/commons/sandbox/proxy/trunk/src: java/org/apache/commons/proxy/provider/NullProvider.java test/org/apache/commons/proxy/provider/TestNullProvider.java

Author: jcarman
Date: Wed Aug 24 16:04:33 2005
New Revision: 239960

URL: http://svn.apache.org/viewcvs?rev=239960&view=rev
Log:
Adding NullProvider

Added:
    jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/NullProvider.java
    jakarta/commons/sandbox/proxy/trunk/src/test/org/apache/commons/proxy/provider/TestNullProvider.java

Added: jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/NullProvider.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/NullProvider.java?rev=239960&view=auto
==============================================================================
--- jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/NullProvider.java (added)
+++ jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/NullProvider.java Wed Aug 24 16:04:33 2005
@@ -0,0 +1,28 @@
+/*
+ *  Copyright 2005 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.commons.proxy.provider;
+
+/**
+ * @author James Carman
+ * @version 1.0
+ */
+public class NullProvider<T> extends ConstantProvider<T>
+{
+    public NullProvider()
+    {
+        super( null );
+    }
+}

Added: jakarta/commons/sandbox/proxy/trunk/src/test/org/apache/commons/proxy/provider/TestNullProvider.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/test/org/apache/commons/proxy/provider/TestNullProvider.java?rev=239960&view=auto
==============================================================================
--- jakarta/commons/sandbox/proxy/trunk/src/test/org/apache/commons/proxy/provider/TestNullProvider.java (added)
+++ jakarta/commons/sandbox/proxy/trunk/src/test/org/apache/commons/proxy/provider/TestNullProvider.java Wed Aug 24 16:04:33 2005
@@ -0,0 +1,31 @@
+/*
+ *  Copyright 2005 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.commons.proxy.provider;
+
+import junit.framework.TestCase;
+
+/**
+ * @author James Carman
+ * @version 1.0
+ */
+public class TestNullProvider extends TestCase
+{
+    public void testGetObject()
+    {
+        final NullProvider provider = new NullProvider();
+        assertNull( provider.getObject() );
+    }
+}



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org