Return-Path: X-Original-To: apmail-logging-commits-archive@minotaur.apache.org Delivered-To: apmail-logging-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0185E100AC for ; Fri, 6 Sep 2013 11:08:01 +0000 (UTC) Received: (qmail 13510 invoked by uid 500); 6 Sep 2013 11:08:00 -0000 Delivered-To: apmail-logging-commits-archive@logging.apache.org Received: (qmail 13415 invoked by uid 500); 6 Sep 2013 11:07:55 -0000 Mailing-List: contact commits-help@logging.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@logging.apache.org Delivered-To: mailing list commits@logging.apache.org Received: (qmail 13402 invoked by uid 99); 6 Sep 2013 11:07:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Sep 2013 11:07:53 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Sep 2013 11:07:52 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 1F5EF2388980; Fri, 6 Sep 2013 11:07:32 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: svn commit: r1520538 - in /logging/log4net/trunk/tests/src: Appender/AppenderCollectionTest.cs log4net.Tests.vs2003.csproj log4net.Tests.vs2008.csproj log4net.Tests.vs2010.csproj Date: Fri, 06 Sep 2013 11:07:31 -0000 To: commits@logging.apache.org From: dpsenner@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20130906110732.1F5EF2388980@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: dpsenner Date: Fri Sep 6 11:07:31 2013 New Revision: 1520538 URL: http://svn.apache.org/r1520538 Log: LOG4NET-390 added test cases that test the appender collection ToArray() method Added: logging/log4net/trunk/tests/src/Appender/AppenderCollectionTest.cs Modified: logging/log4net/trunk/tests/src/log4net.Tests.vs2003.csproj logging/log4net/trunk/tests/src/log4net.Tests.vs2008.csproj logging/log4net/trunk/tests/src/log4net.Tests.vs2010.csproj Added: logging/log4net/trunk/tests/src/Appender/AppenderCollectionTest.cs URL: http://svn.apache.org/viewvc/logging/log4net/trunk/tests/src/Appender/AppenderCollectionTest.cs?rev=1520538&view=auto ============================================================================== --- logging/log4net/trunk/tests/src/Appender/AppenderCollectionTest.cs (added) +++ logging/log4net/trunk/tests/src/Appender/AppenderCollectionTest.cs Fri Sep 6 11:07:31 2013 @@ -0,0 +1,65 @@ +#region Apache License +// +// 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. +// +#endregion + +using log4net.Appender; +using NUnit.Framework; + +namespace log4net.Tests.Appender +{ + /// + /// Used for internal unit testing the class. + /// + /// + /// Used for internal unit testing the class. + /// + /// Carlos Muñoz + [TestFixture] + public class AppenderCollectionTest + { + /// + /// Verifies that ToArray returns the elements of the + /// + [Test] + public void ToArrayTest() + { + AppenderCollection appenderCollection = new AppenderCollection(); + IAppender appender = new MemoryAppender(); + appenderCollection.Add(appender); + + IAppender[] appenderArray = appenderCollection.ToArray(); + + Assert.AreEqual(1, appenderArray.Length); + Assert.AreEqual(appender, appenderArray[0]); + } + + [Test] + public void ReadOnlyToArrayTest() + { + AppenderCollection appenderCollection = new AppenderCollection(); + IAppender appender = new MemoryAppender(); + appenderCollection.Add(appender); + AppenderCollection readonlyAppenderCollection = AppenderCollection.ReadOnly(appenderCollection); + + IAppender[] appenderArray = readonlyAppenderCollection.ToArray(); + + Assert.AreEqual(1, appenderArray.Length); + Assert.AreEqual(appender, appenderArray[0]); + } + } +} \ No newline at end of file Modified: logging/log4net/trunk/tests/src/log4net.Tests.vs2003.csproj URL: http://svn.apache.org/viewvc/logging/log4net/trunk/tests/src/log4net.Tests.vs2003.csproj?rev=1520538&r1=1520537&r2=1520538&view=diff ============================================================================== --- logging/log4net/trunk/tests/src/log4net.Tests.vs2003.csproj (original) +++ logging/log4net/trunk/tests/src/log4net.Tests.vs2003.csproj Fri Sep 6 11:07:31 2013 @@ -137,6 +137,11 @@ BuildAction = "Compile" /> + + Code Modified: logging/log4net/trunk/tests/src/log4net.Tests.vs2010.csproj URL: http://svn.apache.org/viewvc/logging/log4net/trunk/tests/src/log4net.Tests.vs2010.csproj?rev=1520538&r1=1520537&r2=1520538&view=diff ============================================================================== --- logging/log4net/trunk/tests/src/log4net.Tests.vs2010.csproj (original) +++ logging/log4net/trunk/tests/src/log4net.Tests.vs2010.csproj Fri Sep 6 11:07:31 2013 @@ -140,6 +140,7 @@ + Code