Code was simplified with TestCase

Project: http://git-wip-us.apache.org/repos/asf/logging-log4net/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4net/commit/f22025fd
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4net/tree/f22025fd
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4net/diff/f22025fd

Branch: refs/heads/feature/rfa-configurable-rolling-mutex
Commit: f22025fd4d6657019577606a4813953cb0137be2
Parents: 6935940
Author: Andrei Stryia <andrei_str...@epam.com>
Authored: Mon Oct 1 13:42:43 2018 +0300
Committer: Andrei Stryia <andrei_str...@epam.com>
Committed: Mon Oct 1 13:42:43 2018 +0300

----------------------------------------------------------------------
 tests/src/Appender/RollingFileAppenderTest.cs | 22 ++++------------------
 1 file changed, 4 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/f22025fd/tests/src/Appender/RollingFileAppenderTest.cs
----------------------------------------------------------------------
diff --git a/tests/src/Appender/RollingFileAppenderTest.cs 
b/tests/src/Appender/RollingFileAppenderTest.cs
index bb185c9..46bce8d 100644
--- a/tests/src/Appender/RollingFileAppenderTest.cs
+++ b/tests/src/Appender/RollingFileAppenderTest.cs
@@ -1750,24 +1750,11 @@ namespace log4net.Tests.Appender
                }
 
                /// <summary>
-               /// Verifies that the rolling file appender works when 
configured with rolling lock strategy none
+               /// Verifies that the rolling file appender works when 
configured with rolling lock strategy none and local mutex
                /// </summary>
-               [Test]
-               public void TestRollingLockStrategyNone()
-               {
-                       
TestRollingLockStrategy(RollingFileAppender.RollingLockStrategyKind.None);
-               }
-
-               /// <summary>
-               /// Verifies that the rolling file appender works when 
configured with rolling lock strategy local mutex
-               /// </summary>
-               [Test]
-               public void TestRollingLockStrategyLocalMutex()
-               {
-                       
TestRollingLockStrategy(RollingFileAppender.RollingLockStrategyKind.LocalMutex);
-               }
-
-               private void 
TestRollingLockStrategy(RollingFileAppender.RollingLockStrategyKind strategy)
+               
[TestCase(RollingFileAppender.RollingLockStrategyKind.LocalMutex)]
+               [TestCase(RollingFileAppender.RollingLockStrategyKind.None)]
+               public void 
TestRollingLockStrategy(RollingFileAppender.RollingLockStrategyKind strategy)
                {
                        String filename = c_fileName;
                        SilentErrorHandler sh = new SilentErrorHandler();
@@ -1789,7 +1776,6 @@ namespace log4net.Tests.Appender
                        Assert.IsEmpty(sh.Message);
                }
 
-
                /// <summary>
                /// Tests the count up case, with infinite max backups , to see 
that
                /// initialization of the rolling file appender results in the 
expected value

Reply via email to