@@ -40,9 +40,9 @@ namespace log4net.Tests.Appender;
40
40
/// Used for internal unit testing the <see cref="RollingFileAppender"/> class.
41
41
/// </summary>
42
42
[ TestFixture ]
43
- public sealed class RollingFileAppenderTest
43
+ public class RollingFileAppenderTest
44
44
{
45
- private const string FileName = "test_41d3d834_4320f4da.log" ;
45
+ protected string FileName = "test_41d3d834_4320f4da.log" ;
46
46
47
47
private const string TestMessage98Chars =
48
48
"01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567" ;
@@ -99,7 +99,7 @@ private void InitializeVariables()
99
99
/// with all appenders, and deletes any test files used
100
100
/// for logging.
101
101
/// </summary>
102
- private static void ResetAndDeleteTestFiles ( )
102
+ private void ResetAndDeleteTestFiles ( )
103
103
{
104
104
// Regular users should not use the clear method lightly!
105
105
LogManager . GetRepository ( ) . ResetConfiguration ( ) ;
@@ -144,7 +144,7 @@ public void TearDown()
144
144
/// Finds the number of files that match the base file name,
145
145
/// and matches the result against an expected count
146
146
/// </summary>
147
- private static void VerifyFileCount ( int expectedCount , bool preserveLogFileNameExtension = false )
147
+ private void VerifyFileCount ( int expectedCount , bool preserveLogFileNameExtension = false )
148
148
{
149
149
List < string > files = GetExistingFiles ( FileName , preserveLogFileNameExtension ) ;
150
150
Assert . That ( files , Is . Not . Null ) ;
@@ -154,7 +154,7 @@ private static void VerifyFileCount(int expectedCount, bool preserveLogFileNameE
154
154
/// <summary>
155
155
/// Creates a file with the given number, and the shared base file name
156
156
/// </summary>
157
- private static void CreateFile ( int fileNumber )
157
+ private void CreateFile ( int fileNumber )
158
158
{
159
159
FileInfo fileInfo = new ( MakeFileName ( FileName , fileNumber ) ) ;
160
160
@@ -240,7 +240,7 @@ public void RollingCombinedWithPreserveExtension()
240
240
/// <summary>
241
241
/// Removes all test files that exist
242
242
/// </summary>
243
- private static void DeleteTestFiles ( )
243
+ private void DeleteTestFiles ( )
244
244
{
245
245
List < string > files = GetExistingFiles ( FileName ) ;
246
246
files . AddRange ( GetExistingFiles ( FileName , true ) ) ;
@@ -469,7 +469,7 @@ private static int MessagesPerFile(int messageLength)
469
469
/// Current file name is always the base file name when counting. Dates will need a different approach.
470
470
/// </summary>
471
471
/// <returns></returns>
472
- private static string GetCurrentFile ( ) => FileName ;
472
+ private string GetCurrentFile ( ) => FileName ;
473
473
474
474
/// <summary>
475
475
/// Turns a group of file names into an array of file entries that include the name
@@ -604,7 +604,7 @@ private static RollConditions BuildTableEntry(string backupFiles,
604
604
/// <param name="rollingStats"></param>
605
605
/// <param name="currentNext"></param>
606
606
/// <returns></returns>
607
- private static RollFileEntry MoveNextEntry ( RollingStats rollingStats , RollFileEntry currentNext )
607
+ private RollFileEntry MoveNextEntry ( RollingStats rollingStats , RollFileEntry currentNext )
608
608
{
609
609
rollingStats . MessagesThisFile ++ ;
610
610
if ( rollingStats . MessagesThisFile >= rollingStats . MessagesPerFile )
@@ -621,7 +621,7 @@ private static RollFileEntry MoveNextEntry(RollingStats rollingStats, RollFileEn
621
621
/// Callback point for the regular expression parser. Turns
622
622
/// the number into a file name.
623
623
/// </summary>
624
- private static string NumberedNameMaker ( Match match )
624
+ private string NumberedNameMaker ( Match match )
625
625
=> MakeFileName ( FileName , int . Parse ( match . Value ) ) ;
626
626
627
627
/// <summary>
@@ -642,7 +642,7 @@ private static string ConvertToFiles(string backupInfo, MatchEvaluator evaluator
642
642
/// that results after each message is logged</param>
643
643
/// <param name="messagesToLog">How many times the test message will be repeatedly logged</param>
644
644
/// <returns></returns>
645
- private static RollConditions [ ] MakeNumericTestEntries (
645
+ private RollConditions [ ] MakeNumericTestEntries (
646
646
string testMessage ,
647
647
string backupInfo ,
648
648
int messagesToLog )
@@ -660,7 +660,7 @@ private static RollConditions[] MakeNumericTestEntries(
660
660
/// <param name="messagesToLog">How many times the test message will be repeatedly logged</param>
661
661
/// <param name="evaluator">Function that can turn a number into a filename</param>
662
662
/// <returns></returns>
663
- private static RollConditions [ ] MakeTestEntries (
663
+ private RollConditions [ ] MakeTestEntries (
664
664
string testMessage ,
665
665
string backupInfo ,
666
666
int messagesToLog ,
@@ -1592,7 +1592,7 @@ private static void VerifyInitializeDownFixedExpectedValue(List<string> files, s
1592
1592
///
1593
1593
/// </summary>
1594
1594
/// <param name="fileNumbers">Comma separated list of numbers for counted file names</param>
1595
- private static List < string > MakeTestDataFromString ( string fileNumbers )
1595
+ private List < string > MakeTestDataFromString ( string fileNumbers )
1596
1596
=> MakeTestDataFromString ( FileName , fileNumbers ) ;
1597
1597
1598
1598
/// <summary>
0 commit comments