Skip to content

Commit 6d0212a

Browse files
committed
Fix issue with table clean up in unit tests
1 parent 8c7777f commit 6d0212a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

MssqlMcp/MssqlMcp.Tests/UnitTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
namespace MssqlMcp.Tests
88
{
9-
public sealed class MssqlMcpTests
9+
public sealed class MssqlMcpTests : IDisposable
1010
{
1111
private readonly string _tableName;
1212
private readonly Tools _tools;
@@ -18,7 +18,7 @@ public MssqlMcpTests()
1818
_tools = new Tools(connectionFactory, loggerMock.Object);
1919
}
2020

21-
internal void Dispose()
21+
public void Dispose()
2222
{
2323
// Cleanup: Drop the table after each test
2424
var _ = _tools.DropTable($"DROP TABLE IF EXISTS {_tableName}").GetAwaiter().GetResult();

MssqlMcp/MssqlMcp/Tools/ReadData.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public async Task<DbOperationResult> ReadData(
2323
while (await reader.ReadAsync())
2424
{
2525
var row = new Dictionary<string, object?>();
26-
for (int i = 0; i < reader.FieldCount; i++)
26+
for (var i = 0; i < reader.FieldCount; i++)
2727
{
2828
row[reader.GetName(i)] = reader.IsDBNull(i) ? null : reader.GetValue(i);
2929
}

0 commit comments

Comments
 (0)