View Javadoc

1   // SECTION-START[License Header]
2   // <editor-fold defaultstate="collapsed" desc=" Generated License ">
3   /*
4    *   Java Object Management and Configuration
5    *   Copyright (C) Christian Schulte, 2005-206
6    *   All rights reserved.
7    *
8    *   Redistribution and use in source and binary forms, with or without
9    *   modification, are permitted provided that the following conditions
10   *   are met:
11   *
12   *     o Redistributions of source code must retain the above copyright
13   *       notice, this list of conditions and the following disclaimer.
14   *
15   *     o Redistributions in binary form must reproduce the above copyright
16   *       notice, this list of conditions and the following disclaimer in
17   *       the documentation and/or other materials provided with the
18   *       distribution.
19   *
20   *   THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
21   *   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
22   *   AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
23   *   THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT,
24   *   INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
25   *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26   *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27   *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28   *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
29   *   THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30   *
31   *   $JOMC: ScopeImplementationTest.java 4459 2012-03-27 23:55:31Z schulte2005 $
32   *
33   */
34  // </editor-fold>
35  // SECTION-END
36  package org.jomc.ri.test;
37  
38  import org.junit.Test;
39  import static org.junit.Assert.assertNull;
40  
41  // SECTION-START[Documentation]
42  // <editor-fold defaultstate="collapsed" desc=" Generated Documentation ">
43  /**
44   * Test implementation of the {@code ScopeTestSpecification}.
45   *
46   * <dl>
47   *   <dt><b>Identifier:</b></dt><dd>JOMC :: RI :: Tests :: Scope Implementation Test</dd>
48   *   <dt><b>Name:</b></dt><dd>JOMC :: RI :: Tests :: Scope Implementation Test</dd>
49   *   <dt><b>Specifications:</b></dt>
50   *     <dd>JOMC :: RI :: Tests :: Test Scope Specification Many @ 1.2.2</dd>
51   *     <dd>JOMC :: RI :: Tests :: Test Scope Specification One :: 1 @ 1.2.2</dd>
52   *   <dt><b>Abstract:</b></dt><dd>No</dd>
53   *   <dt><b>Final:</b></dt><dd>No</dd>
54   *   <dt><b>Stateless:</b></dt><dd>No</dd>
55   * </dl>
56   *
57   * @author <a href="mailto:schulte2005@users.sourceforge.net">Christian Schulte</a> 1.0
58   * @version 1.2.2
59   */
60  // </editor-fold>
61  // SECTION-END
62  // SECTION-START[Annotations]
63  // <editor-fold defaultstate="collapsed" desc=" Generated Annotations ">
64  @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.2", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.2" )
65  // </editor-fold>
66  // SECTION-END
67  public class ScopeImplementationTest
68      implements
69      org.jomc.ri.test.support.TestSpecification
70  {
71      // SECTION-START[TestSpecification]
72      // SECTION-END
73      // SECTION-START[ScopeImplementationTest]
74  
75      @Test
76      public final void testUnsupportedScope() throws Exception
77      {
78          assertNull( this.getTestScopeSpecificationOne() );
79          assertNull( this.getTestScopeSpecificationMany() );
80      }
81  
82      // SECTION-END
83      // SECTION-START[Constructors]
84      // <editor-fold defaultstate="collapsed" desc=" Generated Constructors ">
85      /** Creates a new {@code ScopeImplementationTest} instance. */
86      @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.2", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.2" )
87      public ScopeImplementationTest()
88      {
89          // SECTION-START[Default Constructor]
90          super();
91          // SECTION-END
92      }
93      // </editor-fold>
94      // SECTION-END
95      // SECTION-START[Dependencies]
96      // <editor-fold defaultstate="collapsed" desc=" Generated Dependencies ">
97      /**
98       * Gets the {@code <TestScopeSpecificationMany>} dependency.
99       * <p>
100      *   This method returns any available object of the {@code <JOMC :: RI :: Tests :: Test Scope Specification Many>} specification at specification level 1.2.2.
101      *   That specification applies to {@code <DOES_NOT_EXIST>} scope. The does_not_exist object is returned whenever requested.
102      * </p>
103      * <dl>
104      *   <dt><b>Final:</b></dt><dd>No</dd>
105      * </dl>
106      * @return The {@code <TestScopeSpecificationMany>} dependency.
107      * {@code null} if no object is available.
108      * @throws org.jomc.ObjectManagementException if getting the dependency instance fails.
109      */
110     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.2", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.2" )
111     private org.jomc.ri.test.support.TestSpecification[] getTestScopeSpecificationMany()
112     {
113         return (org.jomc.ri.test.support.TestSpecification[]) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "TestScopeSpecificationMany" );
114     }
115     /**
116      * Gets the {@code <TestScopeSpecificationOne>} dependency.
117      * <p>
118      *   This method returns any available object of the {@code <JOMC :: RI :: Tests :: Test Scope Specification One :: 1>} specification at specification level 1.2.2.
119      *   That specification applies to {@code <DOES_NOT_EXIST>} scope. The does_not_exist object is returned whenever requested.
120      * </p>
121      * <dl>
122      *   <dt><b>Final:</b></dt><dd>No</dd>
123      * </dl>
124      * @return The {@code <TestScopeSpecificationOne>} dependency.
125      * {@code null} if no object is available.
126      * @throws org.jomc.ObjectManagementException if getting the dependency instance fails.
127      */
128     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.2", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.2" )
129     private org.jomc.ri.test.support.TestSpecification getTestScopeSpecificationOne()
130     {
131         return (org.jomc.ri.test.support.TestSpecification) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "TestScopeSpecificationOne" );
132     }
133     // </editor-fold>
134     // SECTION-END
135     // SECTION-START[Properties]
136     // SECTION-END
137     // SECTION-START[Messages]
138     // SECTION-END
139 }