mirror of
https://github.com/Govor-team/Govor.git
synced 2026-07-22 20:24:55 +00:00
[TearDown] added
This commit is contained in:
@@ -257,4 +257,10 @@ public class ChatLoadControllerTests
|
||||
// Assert
|
||||
Assert.That(result, Is.InstanceOf<BadRequestObjectResult>());
|
||||
}
|
||||
|
||||
[TearDown]
|
||||
public void TearDown()
|
||||
{
|
||||
_controller?.Dispose();
|
||||
}
|
||||
}
|
||||
@@ -199,4 +199,10 @@ public class FriendsRequestQueryControllerTests
|
||||
var objectResult = result as ObjectResult;
|
||||
Assert.That(objectResult.StatusCode, Is.EqualTo(500));
|
||||
}
|
||||
|
||||
[TearDown]
|
||||
public void TearDown()
|
||||
{
|
||||
_controller?.Dispose();
|
||||
}
|
||||
}
|
||||
@@ -112,6 +112,13 @@ public class OnlinePingingControllerTests
|
||||
_loggerMock.VerifyLog(LogLevel.Error, exception.Message, Times.Once());
|
||||
_pingHandlerServiceMock.Verify(x => x.Ping(It.IsAny<Guid>()), Times.Never());
|
||||
}
|
||||
|
||||
|
||||
[TearDown]
|
||||
public void TearDown()
|
||||
{
|
||||
_controller?.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
// Helper extension for verifying logger calls
|
||||
|
||||
@@ -114,4 +114,11 @@ public class RefreshControllerTests
|
||||
// Assert
|
||||
Assert.That(result, Is.InstanceOf<BadRequestObjectResult>());
|
||||
}
|
||||
|
||||
|
||||
[TearDown]
|
||||
public void TearDown()
|
||||
{
|
||||
_controller?.Dispose();
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ using Govor.API.Common.SignalR.Helpers;
|
||||
using Govor.API.Hubs;
|
||||
using Govor.Application.Interfaces;
|
||||
using Govor.Application.Interfaces.Messages;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Moq;
|
||||
|
||||
@@ -44,4 +45,11 @@ public class ChatsHubTests
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
[TearDown]
|
||||
public void TearDown()
|
||||
{
|
||||
_chatsHub?.Dispose();
|
||||
}
|
||||
}
|
||||
@@ -335,4 +335,10 @@ public class FriendsHubTests
|
||||
Assert.That(result.Status, Is.EqualTo(HubResultStatus.ServerError));
|
||||
Assert.That(result.ErrorMessage, Is.EqualTo("Unexpected error! Please try later!"));
|
||||
}
|
||||
|
||||
[TearDown]
|
||||
public void TearDown()
|
||||
{
|
||||
_hub?.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user