using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Logging; using Model; using StubLib; using API.Controllers.version2; using API.Dto; using EFManager; using Microsoft.AspNetCore.Mvc; using Moq; using FluentAssertions; using EFlib; using Microsoft.EntityFrameworkCore; using static EFManager.ManagerData; namespace TestAPI { public class UnitTestChampionController { /*[Fact] public async Task GetChamps_ReturnsOkResultWithChampionDtoList() { // Arrange var options = new DbContextOptionsBuilder() .UseSqlite("DataSource=:memory:") .Options; using (var context = new SQLiteContext(options)) { context.Database.EnsureCreated(); context.Champions.Add(new EFChampion { Name = "Champion 1" }); context.Champions.Add(new EFChampion { Name = "Champion 2" }); context.SaveChanges(); var controller = new ChampionController(new ManagerData(context), NullLogger.Instance); // Act var result = await controller.GetChamps(); // Assert var okResult = Assert.IsType(result.Result); var dtoChamps = Assert.IsAssignableFrom>(okResult.Value); Assert.Equal(2, dtoChamps.Count()); Assert.Equal("Champion 1", dtoChamps.ElementAt(0).Name); Assert.Equal("Champion 2", dtoChamps.ElementAt(1).Name); } }*/ } }