fix tests
This commit is contained in:
@@ -25,23 +25,23 @@ public class IOllamaClientTests : UnitTestBase
|
||||
// SelectedModel property
|
||||
var selectedModelProperty = properties.FirstOrDefault(p => p.Name == "SelectedModel");
|
||||
selectedModelProperty.Should().NotBeNull();
|
||||
selectedModelProperty!.PropertyType.Should().Be(typeof(string));
|
||||
selectedModelProperty!.PropertyType.Should().Be<string>();
|
||||
selectedModelProperty.CanRead.Should().BeTrue();
|
||||
selectedModelProperty.CanWrite.Should().BeTrue();
|
||||
|
||||
// ChatAsync method
|
||||
var chatAsyncMethod = methods.FirstOrDefault(m => m.Name == "ChatAsync");
|
||||
chatAsyncMethod.Should().NotBeNull();
|
||||
chatAsyncMethod!.ReturnType.Should().Be(typeof(IAsyncEnumerable<ChatResponseStream?>));
|
||||
chatAsyncMethod!.ReturnType.Should().Be<IAsyncEnumerable<ChatResponseStream?>>();
|
||||
chatAsyncMethod.GetParameters().Should().HaveCount(1);
|
||||
chatAsyncMethod.GetParameters()[0].ParameterType.Should().Be(typeof(ChatRequest));
|
||||
chatAsyncMethod.GetParameters()[0].ParameterType.Should().Be<ChatRequest>();
|
||||
|
||||
// ListLocalModelsAsync method
|
||||
var listLocalModelsAsyncMethod = methods.FirstOrDefault(m =>
|
||||
m.Name == "ListLocalModelsAsync"
|
||||
);
|
||||
listLocalModelsAsyncMethod.Should().NotBeNull();
|
||||
listLocalModelsAsyncMethod!.ReturnType.Should().Be(typeof(Task<IEnumerable<Model>>));
|
||||
listLocalModelsAsyncMethod!.ReturnType.Should().Be<Task<IEnumerable<Model>>>();
|
||||
listLocalModelsAsyncMethod.GetParameters().Should().BeEmpty();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user