Skip to content

Commit 52e2616

Browse files
committed
Clean up some tests
1 parent 86cec67 commit 52e2616

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/Serilog.Sinks.MSSqlServer/Sinks/MSSqlServer/ColumnOptions/ColumnOptions.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ public ICollection<StandardColumn> Store
9090

9191
/// <summary>
9292
/// Indicates if triggers should be disabled when inserting log entries.
93+
/// Only applies when SqlBulkCopy is used.
9394
/// </summary>
9495
public bool DisableTriggers { get; set; }
9596

test/Serilog.Sinks.MSSqlServer.Tests/Sinks/MSSqlServer/Platform/SqlInsertBatchWriterTests.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public async Task WriteBatchCallsSqlConnectionFactoryCreate()
7373
}
7474

7575
[Fact]
76-
public async Task WriteBatchCallsSqlConnectionWrapperOpen()
76+
public async Task WriteBatchCallsSqlConnectionWrapperOpenAsync()
7777
{
7878
// Arrange
7979
var logEvents = CreateLogEvents();
@@ -95,7 +95,7 @@ public async Task WriteBatchCallsSqlConnectionWrappeCreateCommand()
9595
await _sut.WriteBatch(logEvents, null);
9696

9797
// Assert
98-
_sqlConnectionWrapperMock.Verify(c => c.CreateCommand(), Times.AtLeastOnce);
98+
_sqlConnectionWrapperMock.Verify(c => c.CreateCommand(), Times.Exactly(logEvents.Count));
9999
}
100100

101101
[Fact]
@@ -169,7 +169,7 @@ public async Task WriteBatchCallsSqlCommandWrapperExecuteNonQueryAsync()
169169
await _sut.WriteBatch(logEvents, null);
170170

171171
// Assert
172-
_sqlCommandWrapperMock.Verify(c => c.ExecuteNonQueryAsync(), Times.AtLeastOnce);
172+
_sqlCommandWrapperMock.Verify(c => c.ExecuteNonQueryAsync(), Times.Exactly(logEvents.Count));
173173
}
174174

175175
[Fact]
@@ -182,7 +182,7 @@ public async Task WriteBatchCallsSqlCommandWrapperDispose()
182182
await _sut.WriteBatch(logEvents, null);
183183

184184
// Assert
185-
_sqlCommandWrapperMock.Verify(c => c.Dispose(), Times.AtLeastOnce);
185+
_sqlCommandWrapperMock.Verify(c => c.Dispose(), Times.Exactly(logEvents.Count));
186186
}
187187

188188
[Fact]
@@ -247,7 +247,7 @@ public async Task WriteBatchRethrowsIfSqlCommandAddParameterThrows()
247247
}
248248

249249
[Fact]
250-
public async Task WriteBatchRethrowsIfSqlCommandExecuteNonQueryThrows()
250+
public async Task WriteBatchRethrowsIfSqlCommandExecuteNonQueryAsyncThrows()
251251
{
252252
// Arrange
253253
_sqlCommandWrapperMock.Setup(c => c.ExecuteNonQueryAsync()).Callback(() => throw new InvalidOperationException());

0 commit comments

Comments
 (0)