001// SECTION-START[License Header] 002// <editor-fold defaultstate="collapsed" desc=" Generated License "> 003/* 004 * Java Object Management and Configuration 005 * Copyright (C) Christian Schulte, 2005-206 006 * All rights reserved. 007 * 008 * Redistribution and use in source and binary forms, with or without 009 * modification, are permitted provided that the following conditions 010 * are met: 011 * 012 * o Redistributions of source code must retain the above copyright 013 * notice, this list of conditions and the following disclaimer. 014 * 015 * o Redistributions in binary form must reproduce the above copyright 016 * notice, this list of conditions and the following disclaimer in 017 * the documentation and/or other materials provided with the 018 * distribution. 019 * 020 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 021 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY 022 * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 023 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, 024 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 025 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 026 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 027 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 028 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 029 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 030 * 031 * $JOMC: Log4JLoggerTest.java 4723 2013-01-03 08:50:05Z schulte $ 032 * 033 */ 034// </editor-fold> 035// SECTION-END 036package org.jomc.logging.ri.log4j.test; 037 038import org.jomc.logging.it.LoggerTest; 039 040// SECTION-START[Documentation] 041// <editor-fold defaultstate="collapsed" desc=" Generated Documentation "> 042/** 043 * Test cases for class {@code org.jomc.logging.ri.jdk.JdkLogger}. 044 * 045 * <dl> 046 * <dt><b>Identifier:</b></dt><dd>org.jomc.logging.ri.log4j.test.Log4JLoggerTest</dd> 047 * <dt><b>Name:</b></dt><dd>JOMC Logging ⁑ Log4J Logging</dd> 048 * <dt><b>Abstract:</b></dt><dd>No</dd> 049 * <dt><b>Final:</b></dt><dd>No</dd> 050 * <dt><b>Stateless:</b></dt><dd>Yes</dd> 051 * </dl> 052 * 053 * @author <a href="mailto:cs@schulte.it">Christian Schulte</a> 1.0 054 * @version 1.2 055 */ 056// </editor-fold> 057// SECTION-END 058// SECTION-START[Annotations] 059// <editor-fold defaultstate="collapsed" desc=" Generated Annotations "> 060@javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" ) 061// </editor-fold> 062// SECTION-END 063public final class Log4JLoggerTest extends LoggerTest 064{ 065 // SECTION-START[Log4JLoggerTest] 066 // SECTION-END 067 // SECTION-START[Constructors] 068 // <editor-fold defaultstate="collapsed" desc=" Generated Constructors "> 069 /** Creates a new {@code Log4JLoggerTest} instance. */ 070 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" ) 071 public Log4JLoggerTest() 072 { 073 // SECTION-START[Default Constructor] 074 super(); 075 // SECTION-END 076 } 077 // </editor-fold> 078 // SECTION-END 079 // SECTION-START[Dependencies] 080 // <editor-fold defaultstate="collapsed" desc=" Generated Dependencies "> 081 /** 082 * Gets the {@code <Locale>} dependency. 083 * <p> 084 * This method returns the {@code <default>} object of the {@code <java.util.Locale>} specification at specification level 1.1. 085 * That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance. 086 * </p> 087 * <dl> 088 * <dt><b>Final:</b></dt><dd>No</dd> 089 * </dl> 090 * @return The {@code <Locale>} dependency. 091 * @throws org.jomc.ObjectManagementException if getting the dependency instance fails. 092 */ 093 @SuppressWarnings("unused") 094 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" ) 095 private java.util.Locale getLocale() 096 { 097 final java.util.Locale _d = (java.util.Locale) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "Locale" ); 098 assert _d != null : "'Locale' dependency not found."; 099 return _d; 100 } 101 /** 102 * Gets the {@code <Logger>} dependency. 103 * <p> 104 * This method returns any available object of the {@code <org.jomc.logging.Logger>} specification at specification level 1.0. 105 * That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance. 106 * </p> 107 * <p><strong>Properties:</strong> 108 * <table border="1" width="100%" cellpadding="3" cellspacing="0"> 109 * <tr class="TableSubHeadingColor"> 110 * <th align="left" scope="col" nowrap><b>Name</b></th> 111 * <th align="left" scope="col" nowrap><b>Type</b></th> 112 * <th align="left" scope="col" nowrap><b>Documentation</b></th> 113 * </tr> 114 * <tr class="TableRow"> 115 * <td align="left" valign="top" nowrap>{@code <name>}</td> 116 * <td align="left" valign="top" nowrap>{@code java.lang.String}</td> 117 * <td align="left" valign="top"></td> 118 * </tr> 119 * </table> 120 * </p> 121 * <dl> 122 * <dt><b>Final:</b></dt><dd>No</dd> 123 * </dl> 124 * @return Implementation tests are performed with. 125 * {@code null} if no object is available. 126 * @throws org.jomc.ObjectManagementException if getting the dependency instance fails. 127 */ 128 @SuppressWarnings("unused") 129 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" ) 130 private org.jomc.logging.Logger getLogger() 131 { 132 return (org.jomc.logging.Logger) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "Logger" ); 133 } 134 // </editor-fold> 135 // SECTION-END 136 // SECTION-START[Properties] 137 // SECTION-END 138 // SECTION-START[Messages] 139 // <editor-fold defaultstate="collapsed" desc=" Generated Messages "> 140 /** 141 * Gets the text of the {@code <Test Implementation Not Found Message>} message. 142 * <p><dl> 143 * <dt><b>Languages:</b></dt> 144 * <dd>English (default)</dd> 145 * <dd>Deutsch</dd> 146 * <dt><b>Final:</b></dt><dd>Yes</dd> 147 * </dl></p> 148 * @param locale The locale of the message to return. 149 * @return The text of the {@code <Test Implementation Not Found Message>} message for {@code locale}. 150 * @throws org.jomc.ObjectManagementException if getting the message instance fails. 151 */ 152 @SuppressWarnings("unused") 153 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" ) 154 private String getTestImplementationNotFoundMessage( final java.util.Locale locale ) 155 { 156 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Test Implementation Not Found Message", locale ); 157 assert _m != null : "'Test Implementation Not Found Message' message not found."; 158 return _m; 159 } 160 // </editor-fold> 161 // SECTION-END 162}