This commit is contained in:
@@ -22,7 +22,7 @@ public class ISessionStorageTests : UnitTestBase
|
||||
// GetOrCreateAsync method
|
||||
var getOrCreateMethod = methods.FirstOrDefault(m => m.Name == "GetOrCreateAsync");
|
||||
getOrCreateMethod.Should().NotBeNull();
|
||||
getOrCreateMethod!.ReturnType.Should().Be(typeof(Task<ChatSession>));
|
||||
getOrCreateMethod!.ReturnType.Should().Be<Task<ChatSession>>();
|
||||
getOrCreateMethod.GetParameters().Should().HaveCount(3);
|
||||
getOrCreateMethod.GetParameters()[0].ParameterType.Should().Be<long>();
|
||||
getOrCreateMethod.GetParameters()[1].ParameterType.Should().Be<string>();
|
||||
@@ -31,14 +31,14 @@ public class ISessionStorageTests : UnitTestBase
|
||||
// GetAsync method
|
||||
var getMethod = methods.FirstOrDefault(m => m.Name == "GetAsync");
|
||||
getMethod.Should().NotBeNull();
|
||||
getMethod!.ReturnType.Should().Be(typeof(Task<ChatSession?>));
|
||||
getMethod!.ReturnType.Should().Be<Task<ChatSession?>>();
|
||||
getMethod.GetParameters().Should().HaveCount(1);
|
||||
getMethod.GetParameters()[0].ParameterType.Should().Be<long>();
|
||||
|
||||
// RemoveAsync method
|
||||
var removeMethod = methods.FirstOrDefault(m => m.Name == "RemoveAsync");
|
||||
removeMethod.Should().NotBeNull();
|
||||
removeMethod!.ReturnType.Should().Be(typeof(Task<bool>));
|
||||
removeMethod!.ReturnType.Should().Be<Task<bool>>();
|
||||
removeMethod.GetParameters().Should().HaveCount(1);
|
||||
removeMethod.GetParameters()[0].ParameterType.Should().Be<long>();
|
||||
|
||||
@@ -47,13 +47,13 @@ public class ISessionStorageTests : UnitTestBase
|
||||
m.Name == "GetActiveSessionsCountAsync"
|
||||
);
|
||||
getActiveSessionsCountMethod.Should().NotBeNull();
|
||||
getActiveSessionsCountMethod!.ReturnType.Should().Be(typeof(Task<int>));
|
||||
getActiveSessionsCountMethod!.ReturnType.Should().Be<Task<int>>();
|
||||
getActiveSessionsCountMethod.GetParameters().Should().BeEmpty();
|
||||
|
||||
// CleanupOldSessionsAsync method
|
||||
var cleanupOldSessionsMethod = methods.FirstOrDefault(m => m.Name == "CleanupOldSessionsAsync");
|
||||
cleanupOldSessionsMethod.Should().NotBeNull();
|
||||
cleanupOldSessionsMethod!.ReturnType.Should().Be(typeof(Task<int>));
|
||||
cleanupOldSessionsMethod!.ReturnType.Should().Be<Task<int>>();
|
||||
cleanupOldSessionsMethod.GetParameters().Should().HaveCount(1);
|
||||
cleanupOldSessionsMethod.GetParameters()[0].ParameterType.Should().Be<int>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user