Skip to content

Commit fdfea7d

Browse files
committed
Reorganization in tests project
Moved all test classes in root folder to Misc.
1 parent 33f0485 commit fdfea7d

10 files changed

+63
-63
lines changed

test/Serilog.Sinks.MSSqlServer.Tests/AdditionalPropertiesTests.cs renamed to test/Serilog.Sinks.MSSqlServer.Tests/Misc/AdditionalPropertiesTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using Xunit;
55
using Xunit.Abstractions;
66

7-
namespace Serilog.Sinks.MSSqlServer.Tests
7+
namespace Serilog.Sinks.MSSqlServer.Tests.Misc
88
{
99
[Trait(TestCategory.TraitName, TestCategory.Integration)]
1010
public class AdditionalPropertiesTests : DatabaseTestsBase
@@ -19,7 +19,7 @@ public void WritesLogEventWithColumnNamedProperties()
1919
// Arrange
2020
const string additionalColumnName1 = "AdditionalColumn1";
2121
const string additionalColumnName2 = "AdditionalColumn2";
22-
var columnOptions = new Serilog.Sinks.MSSqlServer.ColumnOptions
22+
var columnOptions = new MSSqlServer.ColumnOptions
2323
{
2424
AdditionalColumns = new List<SqlColumn>
2525
{
@@ -73,7 +73,7 @@ public void WritesLogEventWithCustomNamedProperties()
7373
const string additionalProperty1Name = "AdditionalProperty1";
7474
const string additionalColumn2Name = "AdditionalColumn2";
7575
const string additionalProperty2Name = "AdditionalProperty2";
76-
var columnOptions = new Serilog.Sinks.MSSqlServer.ColumnOptions
76+
var columnOptions = new MSSqlServer.ColumnOptions
7777
{
7878
AdditionalColumns = new List<SqlColumn>
7979
{

test/Serilog.Sinks.MSSqlServer.Tests/CustomStandardColumnNamesTests.cs renamed to test/Serilog.Sinks.MSSqlServer.Tests/Misc/CustomStandardColumnNamesTests.cs

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
using Xunit;
66
using Xunit.Abstractions;
77

8-
namespace Serilog.Sinks.MSSqlServer.Tests
8+
namespace Serilog.Sinks.MSSqlServer.Tests.Misc
99
{
1010
[Trait(TestCategory.TraitName, TestCategory.Integration)]
1111
public class CustomStandardColumnNamesTests : DatabaseTestsBase
@@ -19,7 +19,7 @@ public CustomStandardColumnNamesTests(ITestOutputHelper output) : base(output)
1919
public void CustomIdColumnLegacyInterface()
2020
{
2121
// Arrange
22-
var options = new Serilog.Sinks.MSSqlServer.ColumnOptions();
22+
var options = new MSSqlServer.ColumnOptions();
2323
var customIdName = "CustomIdName";
2424
options.Id.ColumnName = customIdName;
2525

@@ -35,7 +35,7 @@ public void CustomIdColumnLegacyInterface()
3535
public void CustomIdColumnSinkOptionsInterface()
3636
{
3737
// Arrange
38-
var columnOptions = new Serilog.Sinks.MSSqlServer.ColumnOptions();
38+
var columnOptions = new MSSqlServer.ColumnOptions();
3939
var customIdName = "CustomIdName";
4040
columnOptions.Id.ColumnName = customIdName;
4141

@@ -60,7 +60,7 @@ public void CustomIdColumnSinkOptionsInterface()
6060
public void DefaultIdColumnLegacyInterface()
6161
{
6262
// Arrange
63-
var options = new Serilog.Sinks.MSSqlServer.ColumnOptions();
63+
var options = new MSSqlServer.ColumnOptions();
6464

6565
// Act
6666
using (var sink = new MSSqlServerSink(DatabaseFixture.LogEventsConnectionString, DatabaseFixture.LogTableName, 1, TimeSpan.FromSeconds(1), null, true, options, "dbo", null))
@@ -74,7 +74,7 @@ public void DefaultIdColumnLegacyInterface()
7474
public void DefaultIdColumnSinkOptionsInterface()
7575
{
7676
// Arrange
77-
var columnOptions = new Serilog.Sinks.MSSqlServer.ColumnOptions();
77+
var columnOptions = new MSSqlServer.ColumnOptions();
7878

7979
// Act
8080
using (var sink = new MSSqlServerSink(DatabaseFixture.LogEventsConnectionString,
@@ -97,7 +97,7 @@ public void DefaultIdColumnSinkOptionsInterface()
9797
public void TableCreatedWithCustomNamesLegacyInterface()
9898
{
9999
// Arrange
100-
var options = new Serilog.Sinks.MSSqlServer.ColumnOptions();
100+
var options = new MSSqlServer.ColumnOptions();
101101
var standardNames = new List<string> { "CustomMessage", "CustomMessageTemplate", "CustomLevel", "CustomTimeStamp", "CustomException", "CustomProperties" };
102102

103103
options.Message.ColumnName = "CustomMessage";
@@ -119,7 +119,7 @@ public void TableCreatedWithCustomNamesLegacyInterface()
119119
public void TableCreatedWithCustomNamesSinkOptionsInterface()
120120
{
121121
// Arrange
122-
var columnOptions = new Serilog.Sinks.MSSqlServer.ColumnOptions();
122+
var columnOptions = new MSSqlServer.ColumnOptions();
123123
var standardNames = new List<string> { "CustomMessage", "CustomMessageTemplate", "CustomLevel", "CustomTimeStamp", "CustomException", "CustomProperties" };
124124

125125
columnOptions.Message.ColumnName = "CustomMessage";
@@ -150,7 +150,7 @@ public void TableCreatedWithCustomNamesSinkOptionsInterface()
150150
public void TableCreatedWithDefaultNamesLegacyInterface()
151151
{
152152
// Arrange
153-
var options = new Serilog.Sinks.MSSqlServer.ColumnOptions();
153+
var options = new MSSqlServer.ColumnOptions();
154154
var standardNames = new List<string> { "Message", "MessageTemplate", "Level", "TimeStamp", "Exception", "Properties" };
155155

156156
// Act
@@ -165,7 +165,7 @@ public void TableCreatedWithDefaultNamesLegacyInterface()
165165
public void TableCreatedWithDefaultNamesSinkOptionsInterface()
166166
{
167167
// Arrange
168-
var columnOptions = new Serilog.Sinks.MSSqlServer.ColumnOptions();
168+
var columnOptions = new MSSqlServer.ColumnOptions();
169169
var standardNames = new List<string> { "Message", "MessageTemplate", "Level", "TimeStamp", "Exception", "Properties" };
170170

171171
// Act
@@ -189,7 +189,7 @@ public void TableCreatedWithDefaultNamesSinkOptionsInterface()
189189
public void WriteEventToCustomStandardColumnsLegacyInterface()
190190
{
191191
// Arrange
192-
var options = new Serilog.Sinks.MSSqlServer.ColumnOptions();
192+
var options = new MSSqlServer.ColumnOptions();
193193

194194
options.Message.ColumnName = "CustomMessage";
195195
options.MessageTemplate.ColumnName = "CustomMessageTemplate";
@@ -211,7 +211,7 @@ public void WriteEventToCustomStandardColumnsLegacyInterface()
211211
const string loggingInformationMessage = "Logging Information message";
212212
using (var file = File.CreateText("CustomColumnsEvent.Self.log"))
213213
{
214-
Serilog.Debugging.SelfLog.Enable(TextWriter.Synchronized(file));
214+
Debugging.SelfLog.Enable(TextWriter.Synchronized(file));
215215
Log.Information(loggingInformationMessage);
216216
Log.CloseAndFlush();
217217
}
@@ -224,7 +224,7 @@ public void WriteEventToCustomStandardColumnsLegacyInterface()
224224
public void WriteEventToCustomStandardColumnsSinkOptionsInterface()
225225
{
226226
// Arrange
227-
var options = new Serilog.Sinks.MSSqlServer.ColumnOptions();
227+
var options = new MSSqlServer.ColumnOptions();
228228

229229
options.Message.ColumnName = "CustomMessage";
230230
options.MessageTemplate.ColumnName = "CustomMessageTemplate";
@@ -249,7 +249,7 @@ public void WriteEventToCustomStandardColumnsSinkOptionsInterface()
249249
const string loggingInformationMessage = "Logging Information message";
250250
using (var file = File.CreateText("CustomColumnsEvent.Self.log"))
251251
{
252-
Serilog.Debugging.SelfLog.Enable(TextWriter.Synchronized(file));
252+
Debugging.SelfLog.Enable(TextWriter.Synchronized(file));
253253
Log.Information(loggingInformationMessage);
254254
Log.CloseAndFlush();
255255
}
@@ -270,14 +270,14 @@ public void WriteEventToDefaultStandardColumnsLegacyInterface()
270270
autoCreateSqlTable: true,
271271
batchPostingLimit: 1,
272272
period: TimeSpan.FromSeconds(10),
273-
columnOptions: new Serilog.Sinks.MSSqlServer.ColumnOptions())
273+
columnOptions: new MSSqlServer.ColumnOptions())
274274
.CreateLogger();
275275

276276
// Act
277277
const string loggingInformationMessage = "Logging Information message";
278278
using (var file = File.CreateText("StandardColumns.Self.log"))
279279
{
280-
Serilog.Debugging.SelfLog.Enable(TextWriter.Synchronized(file));
280+
Debugging.SelfLog.Enable(TextWriter.Synchronized(file));
281281
Log.Information(loggingInformationMessage);
282282
Log.CloseAndFlush();
283283
}
@@ -300,14 +300,14 @@ public void WriteEventToDefaultStandardColumnsSinkOptionsInterface()
300300
BatchPostingLimit = 1,
301301
BatchPeriod = TimeSpan.FromSeconds(10)
302302
},
303-
columnOptions: new Serilog.Sinks.MSSqlServer.ColumnOptions())
303+
columnOptions: new MSSqlServer.ColumnOptions())
304304
.CreateLogger();
305305

306306
// Act
307307
const string loggingInformationMessage = "Logging Information message";
308308
using (var file = File.CreateText("StandardColumns.Self.log"))
309309
{
310-
Serilog.Debugging.SelfLog.Enable(TextWriter.Synchronized(file));
310+
Debugging.SelfLog.Enable(TextWriter.Synchronized(file));
311311
Log.Information(loggingInformationMessage);
312312
Log.CloseAndFlush();
313313
}
@@ -321,7 +321,7 @@ public void WriteEventToDefaultStandardColumnsSinkOptionsInterface()
321321
public void AuditEventToCustomStandardColumnsLegacyInterface()
322322
{
323323
// Arrange
324-
var options = new Serilog.Sinks.MSSqlServer.ColumnOptions();
324+
var options = new MSSqlServer.ColumnOptions();
325325

326326
options.Message.ColumnName = "CustomMessage";
327327
options.MessageTemplate.ColumnName = "CustomMessageTemplate";
@@ -343,7 +343,7 @@ public void AuditEventToCustomStandardColumnsLegacyInterface()
343343
const string loggingInformationMessage = "Logging Information message";
344344
using (var file = File.CreateText("CustomColumnsAuditEvent.Self.log"))
345345
{
346-
Serilog.Debugging.SelfLog.Enable(TextWriter.Synchronized(file));
346+
Debugging.SelfLog.Enable(TextWriter.Synchronized(file));
347347
Log.Information(loggingInformationMessage);
348348
Log.CloseAndFlush();
349349
}
@@ -356,7 +356,7 @@ public void AuditEventToCustomStandardColumnsLegacyInterface()
356356
public void AuditEventToCustomStandardColumnsSinkOptionsInterface()
357357
{
358358
// Arrange
359-
var options = new Serilog.Sinks.MSSqlServer.ColumnOptions();
359+
var options = new MSSqlServer.ColumnOptions();
360360

361361
options.Message.ColumnName = "CustomMessage";
362362
options.MessageTemplate.ColumnName = "CustomMessageTemplate";
@@ -381,7 +381,7 @@ public void AuditEventToCustomStandardColumnsSinkOptionsInterface()
381381
const string loggingInformationMessage = "Logging Information message";
382382
using (var file = File.CreateText("CustomColumnsAuditEvent.Self.log"))
383383
{
384-
Serilog.Debugging.SelfLog.Enable(TextWriter.Synchronized(file));
384+
Debugging.SelfLog.Enable(TextWriter.Synchronized(file));
385385
Log.Information(loggingInformationMessage);
386386
Log.CloseAndFlush();
387387
}
@@ -402,14 +402,14 @@ public void AuditEventToDefaultStandardColumns()
402402
TableName = DatabaseFixture.LogTableName,
403403
AutoCreateSqlTable = true
404404
},
405-
columnOptions: new Serilog.Sinks.MSSqlServer.ColumnOptions())
405+
columnOptions: new MSSqlServer.ColumnOptions())
406406
.CreateLogger();
407407

408408
// Act
409409
const string loggingInformationMessage = "Logging Information message";
410410
using (var file = File.CreateText("StandardColumns.Audit.Self.log"))
411411
{
412-
Serilog.Debugging.SelfLog.Enable(TextWriter.Synchronized(file));
412+
Debugging.SelfLog.Enable(TextWriter.Synchronized(file));
413413

414414
Log.Information(loggingInformationMessage);
415415
Log.CloseAndFlush();

test/Serilog.Sinks.MSSqlServer.Tests/IndexingFeaturesTests.cs renamed to test/Serilog.Sinks.MSSqlServer.Tests/Misc/IndexingFeaturesTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using Xunit;
55
using Xunit.Abstractions;
66

7-
namespace Serilog.Sinks.MSSqlServer.Tests
7+
namespace Serilog.Sinks.MSSqlServer.Tests.Misc
88
{
99
[Trait(TestCategory.TraitName, TestCategory.Integration)]
1010
public class IndexingFeaturesTests : DatabaseTestsBase
@@ -17,7 +17,7 @@ public IndexingFeaturesTests(ITestOutputHelper output) : base(output)
1717
public void NonClusteredDefaultIdPrimaryKey()
1818
{
1919
// Arrange
20-
var columnOptions = new Serilog.Sinks.MSSqlServer.ColumnOptions();
20+
var columnOptions = new MSSqlServer.ColumnOptions();
2121
columnOptions.Id.NonClusteredIndex = true;
2222

2323
Log.Logger = new LoggerConfiguration()
@@ -45,7 +45,7 @@ public void NonClusteredDefaultIdPrimaryKey()
4545
public void AlternatePrimaryKey()
4646
{
4747
// Arrange
48-
var columnOptions = new Serilog.Sinks.MSSqlServer.ColumnOptions();
48+
var columnOptions = new MSSqlServer.ColumnOptions();
4949
columnOptions.PrimaryKey = columnOptions.TimeStamp;
5050

5151
Log.Logger = new LoggerConfiguration()
@@ -75,7 +75,7 @@ public void AlternatePrimaryKey()
7575
public void ColumnstoreIndex()
7676
{
7777
// Arrange
78-
var columnOptions = new Serilog.Sinks.MSSqlServer.ColumnOptions();
78+
var columnOptions = new MSSqlServer.ColumnOptions();
7979
// char MAX not supported prior to SQL2017
8080
columnOptions.Exception.DataLength = 512;
8181
columnOptions.Level.DataLength = 16;

test/Serilog.Sinks.MSSqlServer.Tests/LevelAsEnumTests.cs renamed to test/Serilog.Sinks.MSSqlServer.Tests/Misc/LevelAsEnumTests.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
using Xunit;
77
using Xunit.Abstractions;
88

9-
namespace Serilog.Sinks.MSSqlServer.Tests
9+
namespace Serilog.Sinks.MSSqlServer.Tests.Misc
1010
{
1111
[Trait(TestCategory.TraitName, TestCategory.Integration)]
1212
public class LevelAsEnumTests : DatabaseTestsBase
@@ -29,14 +29,14 @@ public void CanStoreLevelAsEnum()
2929
BatchPostingLimit = 1,
3030
BatchPeriod = TimeSpan.FromSeconds(10)
3131
},
32-
columnOptions: new Serilog.Sinks.MSSqlServer.ColumnOptions { Level = { StoreAsEnum = true } })
32+
columnOptions: new MSSqlServer.ColumnOptions { Level = { StoreAsEnum = true } })
3333
.CreateLogger();
3434

3535
// Act
3636
const string loggingInformationMessage = "Logging Information message";
3737
using (var file = File.CreateText("LevelAsEnum.True.Enum.Self.log"))
3838
{
39-
Serilog.Debugging.SelfLog.Enable(TextWriter.Synchronized(file));
39+
Debugging.SelfLog.Enable(TextWriter.Synchronized(file));
4040
Log.Information(loggingInformationMessage);
4141
Log.CloseAndFlush();
4242
}
@@ -60,14 +60,14 @@ public void CanStoreLevelAsString()
6060
BatchPostingLimit = 1,
6161
BatchPeriod = TimeSpan.FromSeconds(10)
6262
},
63-
columnOptions: new Serilog.Sinks.MSSqlServer.ColumnOptions { Level = { StoreAsEnum = false } })
63+
columnOptions: new MSSqlServer.ColumnOptions { Level = { StoreAsEnum = false } })
6464
.CreateLogger();
6565

6666
// Act
6767
const string loggingInformationMessage = "Logging Information message";
6868
using (var file = File.CreateText("LevelAsEnum.False.Self.log"))
6969
{
70-
Serilog.Debugging.SelfLog.Enable(TextWriter.Synchronized(file));
70+
Debugging.SelfLog.Enable(TextWriter.Synchronized(file));
7171
Log.Information(loggingInformationMessage);
7272
Log.CloseAndFlush();
7373
}
@@ -89,14 +89,14 @@ public void AuditCanStoreLevelAsEnum()
8989
TableName = DatabaseFixture.LogTableName,
9090
AutoCreateSqlTable = true
9191
},
92-
columnOptions: new Serilog.Sinks.MSSqlServer.ColumnOptions { Level = { StoreAsEnum = true } })
92+
columnOptions: new MSSqlServer.ColumnOptions { Level = { StoreAsEnum = true } })
9393
.CreateLogger();
9494

9595
// Act
9696
const string loggingInformationMessage = "Logging Information message";
9797
using (var file = File.CreateText("LevelAsEnum.Audit.True.Enum.Self.log"))
9898
{
99-
Serilog.Debugging.SelfLog.Enable(TextWriter.Synchronized(file));
99+
Debugging.SelfLog.Enable(TextWriter.Synchronized(file));
100100
Log.Information(loggingInformationMessage);
101101
Log.CloseAndFlush();
102102
}
@@ -118,14 +118,14 @@ public void AuditCanStoreLevelAsString()
118118
TableName = DatabaseFixture.LogTableName,
119119
AutoCreateSqlTable = true
120120
},
121-
columnOptions: new Serilog.Sinks.MSSqlServer.ColumnOptions { Level = { StoreAsEnum = false } })
121+
columnOptions: new MSSqlServer.ColumnOptions { Level = { StoreAsEnum = false } })
122122
.CreateLogger();
123123

124124
// Act
125125
const string loggingInformationMessage = "Logging Information message";
126126
using (var file = File.CreateText("LevelAsEnum.Audit.False.Self.log"))
127127
{
128-
Serilog.Debugging.SelfLog.Enable(TextWriter.Synchronized(file));
128+
Debugging.SelfLog.Enable(TextWriter.Synchronized(file));
129129
Log.Information(loggingInformationMessage);
130130
Log.CloseAndFlush();
131131
}

0 commit comments

Comments
 (0)