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: Log4JLoggerTest.java 4274 2012-02-17 04:07:29Z schulte2005 $ 32 * 33 */ 34 // </editor-fold> 35 // SECTION-END 36 package org.jomc.logging.ri.log4j.test; 37 38 import org.jomc.logging.it.LoggerTest; 39 40 // SECTION-START[Documentation] 41 // <editor-fold defaultstate="collapsed" desc=" Generated Documentation "> 42 /** 43 * Test cases for class {@code org.jomc.logging.ri.jdk.JdkLogger}. 44 * 45 * <dl> 46 * <dt><b>Identifier:</b></dt><dd>org.jomc.logging.ri.log4j.test.Log4JLoggerTest</dd> 47 * <dt><b>Name:</b></dt><dd>JOMC Logging Log4J Logging</dd> 48 * <dt><b>Abstract:</b></dt><dd>No</dd> 49 * <dt><b>Final:</b></dt><dd>No</dd> 50 * <dt><b>Stateless:</b></dt><dd>Yes</dd> 51 * </dl> 52 * 53 * @author <a href="mailto:schulte2005@users.sourceforge.net">Christian Schulte</a> 1.0 54 * @version 1.1 55 */ 56 // </editor-fold> 57 // SECTION-END 58 // SECTION-START[Annotations] 59 // <editor-fold defaultstate="collapsed" desc=" Generated Annotations "> 60 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2" ) 61 // </editor-fold> 62 // SECTION-END 63 public final class Log4JLoggerTest extends LoggerTest 64 { 65 // SECTION-START[Log4JLoggerTest] 66 // SECTION-END 67 // SECTION-START[Constructors] 68 // <editor-fold defaultstate="collapsed" desc=" Generated Constructors "> 69 /** Creates a new {@code Log4JLoggerTest} instance. */ 70 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2" ) 71 public Log4JLoggerTest() 72 { 73 // SECTION-START[Default Constructor] 74 super(); 75 // SECTION-END 76 } 77 // </editor-fold> 78 // SECTION-END 79 // SECTION-START[Dependencies] 80 // <editor-fold defaultstate="collapsed" desc=" Generated Dependencies "> 81 /** 82 * Gets the {@code <Locale>} dependency. 83 * <p> 84 * This method returns the {@code <default>} object of the {@code <java.util.Locale>} specification at specification level 1.1. 85 * That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance. 86 * </p> 87 * <dl> 88 * <dt><b>Final:</b></dt><dd>No</dd> 89 * </dl> 90 * @return The {@code <Locale>} dependency. 91 * @throws org.jomc.ObjectManagementException if getting the dependency instance fails. 92 */ 93 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2" ) 94 private java.util.Locale getLocale() 95 { 96 final java.util.Locale _d = (java.util.Locale) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "Locale" ); 97 assert _d != null : "'Locale' dependency not found."; 98 return _d; 99 } 100 /** 101 * Gets the {@code <Logger>} dependency. 102 * <p> 103 * This method returns any available object of the {@code <org.jomc.logging.Logger>} specification at specification level 1.0. 104 * That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance. 105 * </p> 106 * <p><strong>Properties:</strong> 107 * <table border="1" width="100%" cellpadding="3" cellspacing="0"> 108 * <tr class="TableSubHeadingColor"> 109 * <th align="left" scope="col" nowrap><b>Name</b></th> 110 * <th align="left" scope="col" nowrap><b>Type</b></th> 111 * <th align="left" scope="col" nowrap><b>Documentation</b></th> 112 * </tr> 113 * <tr class="TableRow"> 114 * <td align="left" valign="top" nowrap>{@code <name>}</td> 115 * <td align="left" valign="top" nowrap>{@code java.lang.String}</td> 116 * <td align="left" valign="top"></td> 117 * </tr> 118 * </table> 119 * </p> 120 * <dl> 121 * <dt><b>Final:</b></dt><dd>No</dd> 122 * </dl> 123 * @return Implementation tests are performed with. 124 * {@code null} if no object is available. 125 * @throws org.jomc.ObjectManagementException if getting the dependency instance fails. 126 */ 127 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2" ) 128 private org.jomc.logging.Logger getLogger() 129 { 130 return (org.jomc.logging.Logger) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "Logger" ); 131 } 132 // </editor-fold> 133 // SECTION-END 134 // SECTION-START[Properties] 135 // SECTION-END 136 // SECTION-START[Messages] 137 // <editor-fold defaultstate="collapsed" desc=" Generated Messages "> 138 /** 139 * Gets the text of the {@code <Test Implementation Not Found Message>} message. 140 * <p><dl> 141 * <dt><b>Languages:</b></dt> 142 * <dd>English (default)</dd> 143 * <dd>Deutsch</dd> 144 * <dt><b>Final:</b></dt><dd>Yes</dd> 145 * </dl></p> 146 * @param locale The locale of the message to return. 147 * @return The text of the {@code <Test Implementation Not Found Message>} message for {@code locale}. 148 * @throws org.jomc.ObjectManagementException if getting the message instance fails. 149 */ 150 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2" ) 151 private String getTestImplementationNotFoundMessage( final java.util.Locale locale ) 152 { 153 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Test Implementation Not Found Message", locale ); 154 assert _m != null : "'Test Implementation Not Found Message' message not found."; 155 return _m; 156 } 157 // </editor-fold> 158 // SECTION-END 159 }