You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.2 KiB
48 lines
1.2 KiB
using API_LoL_Project.Controllers;
|
|
using DTO;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using Microsoft.Extensions.Logging;
|
|
using Model;
|
|
using StubLib;
|
|
using System.Net;
|
|
|
|
namespace Test_Api
|
|
{
|
|
[TestClass]
|
|
public class ChampionControllerTest
|
|
{
|
|
public readonly ChampionsController championCtrl;
|
|
|
|
public readonly IDataManager stubMgr;
|
|
|
|
public ChampionControllerTest(ILogger<ChampionsController> logger)
|
|
{
|
|
var stubMgr = new StubData();
|
|
|
|
championCtrl = new ChampionsController(stubMgr, logger);
|
|
}
|
|
|
|
[TestMethod]
|
|
public async Task TestGetChampions()
|
|
{
|
|
/* var getResult = await championCtrl.Get();
|
|
Console.WriteLine(getResult);
|
|
var objectRes = getResult as OkObjectResult;
|
|
|
|
Assert.AreEqual(200, objectRes.StatusCode);
|
|
|
|
Assert.IsNotNull(objectRes);
|
|
|
|
var champions = objectRes?.Value as IEnumerable<ChampionDTO>;
|
|
|
|
Assert.IsNotNull(champions);*/
|
|
|
|
/*
|
|
Assert.AreEqual(champions.Count(), await stubMgr.ChampionsMgr.GetNbItems());*/
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
} |