using ChatBot.Models.Configuration; using ChatBot.Services; using ChatBot.Tests.TestUtilities; using FluentAssertions; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Moq; namespace ChatBot.Tests.Services; public class ModelServiceTests : UnitTestBase { private readonly Mock> _loggerMock; private readonly Mock> _optionsMock; private readonly ModelService _modelService; public ModelServiceTests() { _loggerMock = TestDataBuilder.Mocks.CreateLoggerMock(); var ollamaSettings = TestDataBuilder.Configurations.CreateOllamaSettings(); _optionsMock = TestDataBuilder.Mocks.CreateOptionsMock(ollamaSettings); _modelService = new ModelService(_loggerMock.Object, _optionsMock.Object); } [Fact] public void GetCurrentModel_ShouldReturnDefaultModel() { // Act var result = _modelService.GetCurrentModel(); // Assert result.Should().Be("llama3.2"); } [Fact] public async Task InitializeAsync_ShouldLogModelInformation() { // Act await _modelService.InitializeAsync(); // Assert // The method should complete without throwing exceptions // In a real test, we might verify logging calls } }