You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-dev@logging.apache.org by ca...@apache.org on 2007/09/20 19:37:48 UTC

svn commit: r577829 - in /logging/log4cxx/trunk: pom.xml src/test/java/org/apache/log4j/ src/test/java/org/apache/log4j/helpers/ src/test/java/org/apache/log4j/helpers/SyslogWriterTest.java

Author: carnold
Date: Thu Sep 20 10:37:47 2007
New Revision: 577829

URL: http://svn.apache.org/viewvc?rev=577829&view=rev
Log:
LOGCXX-191: Add comparison test of org.apache.log4j.helpers.SyslogWriter

Added:
    logging/log4cxx/trunk/src/test/java/org/apache/log4j/
    logging/log4cxx/trunk/src/test/java/org/apache/log4j/helpers/
    logging/log4cxx/trunk/src/test/java/org/apache/log4j/helpers/SyslogWriterTest.java
Modified:
    logging/log4cxx/trunk/pom.xml

Modified: logging/log4cxx/trunk/pom.xml
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/pom.xml?rev=577829&r1=577828&r2=577829&view=diff
==============================================================================
--- logging/log4cxx/trunk/pom.xml (original)
+++ logging/log4cxx/trunk/pom.xml Thu Sep 20 10:37:47 2007
@@ -189,6 +189,12 @@
 </build>
   <dependencies>
       <dependency>
+        <groupId>log4j</groupId>
+        <artifactId>log4j</artifactId>
+        <version>1.2.15</version>
+        <scope>test</scope>
+      </dependency>      
+      <dependency>
         <groupId>junit</groupId>
         <artifactId>junit</artifactId>
         <version>3.8.1</version>

Added: logging/log4cxx/trunk/src/test/java/org/apache/log4j/helpers/SyslogWriterTest.java
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/test/java/org/apache/log4j/helpers/SyslogWriterTest.java?rev=577829&view=auto
==============================================================================
--- logging/log4cxx/trunk/src/test/java/org/apache/log4j/helpers/SyslogWriterTest.java (added)
+++ logging/log4cxx/trunk/src/test/java/org/apache/log4j/helpers/SyslogWriterTest.java Thu Sep 20 10:37:47 2007
@@ -0,0 +1,41 @@
+/*
+ * 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.
+ */
+package org.apache.log4j.helpers;
+
+import junit.framework.TestCase;
+
+/**
+ * Test of SyslogWriter.
+ */
+public class SyslogWriterTest extends TestCase {
+    /**
+     * Create new instance.
+     * @param testName
+     */
+    public SyslogWriterTest(final String testName) {
+        super(testName);
+    }
+
+    /**
+     * Test writing to an unknown host.
+     * @throws Exception
+     */
+    public void testUnknownHost() throws Exception {
+        SyslogWriter writer = new SyslogWriter("example.invalid");
+        writer.write("Hello, Unknown World.");
+    }
+}