onami-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From marcospera...@apache.org
Subject svn commit: r1435943 - in /incubator/onami/trunk/test/src/site: apt/jsr330.apt site.xml
Date Sun, 20 Jan 2013 20:27:35 GMT
Author: marcosperanza
Date: Sun Jan 20 20:27:35 2013
New Revision: 1435943

URL: http://svn.apache.org/viewvc?rev=1435943&view=rev
Log:
Added JSR330 documentation page.

Added:
    incubator/onami/trunk/test/src/site/apt/jsr330.apt   (with props)
Modified:
    incubator/onami/trunk/test/src/site/site.xml

Added: incubator/onami/trunk/test/src/site/apt/jsr330.apt
URL: http://svn.apache.org/viewvc/incubator/onami/trunk/test/src/site/apt/jsr330.apt?rev=1435943&view=auto
==============================================================================
--- incubator/onami/trunk/test/src/site/apt/jsr330.apt (added)
+++ incubator/onami/trunk/test/src/site/apt/jsr330.apt Sun Jan 20 20:27:35 2013
@@ -0,0 +1,55 @@
+ ------
+ JSR330 Integration
+ ------
+ The Apache Onami developers team
+ ------
+ 2010
+ ------
+~~
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you 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.
+~~
+
+JSR330 integration
+
+  <Apache Onami-Test> provides a nice integration with <JSR330> dependency injection
for Java.
+  By using <<<javax.inject.Inject>>> <OnamiRunner> will provide to
inject the dependency inside your test case.
+
+  Here is a little example:
+  
+
++----------------------------------------+
+@RunWith( OnamiRunner.class )
+public class InjectJSR330ModuleClassTestCase
+    extends AbstractModule
+{
+
+    public void configure()
+    {
+        bind( Integer.class ).annotatedWith( Names.named( "numeber.version" ) ).toInstance(
10 );
+    }
+
+    @javax.inject.Inject
+    @javax.inject.Named( "numeber.version" )
+    private Integer version;
+
+	...
+
+}
++----------------------------------------+
+
+

Propchange: incubator/onami/trunk/test/src/site/apt/jsr330.apt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/onami/trunk/test/src/site/apt/jsr330.apt
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: incubator/onami/trunk/test/src/site/apt/jsr330.apt
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: incubator/onami/trunk/test/src/site/site.xml
URL: http://svn.apache.org/viewvc/incubator/onami/trunk/test/src/site/site.xml?rev=1435943&r1=1435942&r2=1435943&view=diff
==============================================================================
--- incubator/onami/trunk/test/src/site/site.xml (original)
+++ incubator/onami/trunk/test/src/site/site.xml Sun Jan 20 20:27:35 2013
@@ -34,6 +34,7 @@
       <item name="The OnamiRunner" href="core.html" />
       <item name="Guice integration" href="guice.html" />
       <item name="Mock Framework integration" href="mock.html" />
+      <item name="Support of JSR330 Dependency Injection for Java" href="jsr330.html"
/>
     </menu>
 
     <menu ref="reports" />



Mime
View raw message