fix tests
This commit is contained in:
@@ -61,11 +61,11 @@ public class TelegramBotClientWrapperTests : UnitTestBase
|
||||
// Act & Assert
|
||||
var method = typeof(TelegramBotClientWrapper).GetMethod("GetMeAsync");
|
||||
method.Should().NotBeNull();
|
||||
method!.ReturnType.Should().Be(typeof(Task<User>));
|
||||
method!.ReturnType.Should().Be<Task<User>>();
|
||||
|
||||
var parameters = method.GetParameters();
|
||||
parameters.Should().HaveCount(1);
|
||||
parameters[0].ParameterType.Should().Be(typeof(CancellationToken));
|
||||
parameters[0].ParameterType.Should().Be<CancellationToken>();
|
||||
parameters[0].HasDefaultValue.Should().BeTrue();
|
||||
}
|
||||
|
||||
@@ -142,7 +142,7 @@ public class TelegramBotClientWrapperTests : UnitTestBase
|
||||
var constructor = constructors[0];
|
||||
var parameters = constructor.GetParameters();
|
||||
parameters.Should().HaveCount(1);
|
||||
parameters[0].ParameterType.Should().Be(typeof(ITelegramBotClient));
|
||||
parameters[0].ParameterType.Should().Be<ITelegramBotClient>();
|
||||
parameters[0].Name.Should().Be("botClient");
|
||||
}
|
||||
|
||||
@@ -153,7 +153,7 @@ public class TelegramBotClientWrapperTests : UnitTestBase
|
||||
var wrapper = new TelegramBotClientWrapper(_botClientMock.Object);
|
||||
|
||||
// Act & Assert
|
||||
wrapper.GetType().BaseType.Should().Be(typeof(object));
|
||||
wrapper.GetType().BaseType.Should().Be<object>();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -179,11 +179,11 @@ public class TelegramBotClientWrapperTests : UnitTestBase
|
||||
// Assert
|
||||
interfaceMethods.Should().HaveCount(1);
|
||||
interfaceMethods[0].Name.Should().Be("GetMeAsync");
|
||||
interfaceMethods[0].ReturnType.Should().Be(typeof(Task<User>));
|
||||
interfaceMethods[0].ReturnType.Should().Be<Task<User>>();
|
||||
|
||||
var parameters = interfaceMethods[0].GetParameters();
|
||||
parameters.Should().HaveCount(1);
|
||||
parameters[0].ParameterType.Should().Be(typeof(CancellationToken));
|
||||
parameters[0].ParameterType.Should().Be<CancellationToken>();
|
||||
parameters[0].HasDefaultValue.Should().BeTrue();
|
||||
}
|
||||
|
||||
@@ -324,7 +324,7 @@ public class TelegramBotClientWrapperTests : UnitTestBase
|
||||
// Act & Assert
|
||||
getMeMethod.Should().NotBeNull();
|
||||
var returnType = getMeMethod!.ReturnType;
|
||||
returnType.Should().Be(typeof(Task<User>));
|
||||
returnType.Should().Be<Task<User>>();
|
||||
|
||||
var attributes = returnType.GetCustomAttributes(false);
|
||||
attributes.Should().NotBeNull();
|
||||
|
||||
Reference in New Issue
Block a user