Modif test unitaire

pull/1/head
nathan boileau 2 years ago
parent 02bf62fa62
commit 019c8366b0

@ -1,6 +1,8 @@
using apiLOL;
using apiLOL.Controllers;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using StubLib;
namespace TestUnitaire
@ -8,14 +10,15 @@ namespace TestUnitaire
public class TestAPILol
{
[Theory]
[InlineData("Aatrox", "Aatrox est un champion de League of Legends")]
[InlineData("Ahri", "Ahri est un champion de League of Legends")]
[InlineData("Akali", "Akali est un champion de League of Legends")]
[InlineData("Beatrice", "sdfsdfd")]
[InlineData("Maurice", "Ahri est un champion de League of Legends")]
[InlineData("Loupiotte", "Akali est un champion de League of Legends")]
public async Task TestPostChampion(string name, string bio)
{
// Arrange
var data = new StubData();
var controller = new ControllerChampions(new StubData());
var logger = new NullLogger<ControllerChampions>();
var controller = new ControllerChampions(data, logger);
var champDTO = new ChampionDTO(name, bio);
// Act
@ -30,14 +33,15 @@ namespace TestUnitaire
[Theory]
[InlineData("Aatrox", "Aatrox est un champion de League of Legends")]
[InlineData("Ahri", "Ahri est un champion de League of Legends")]
[InlineData("Akali", "Akali est un champion de League of Legends")]
[InlineData("Beatrice", "Aatrox est un champion de League of Legends")]
[InlineData("Maurice", "Ahri est un champion de League of Legends")]
[InlineData("Loupiotte", "Akali est un champion de League of Legends")]
public async Task TestGetChampion(string name, string bio)
{
// Arrange
var data = new StubData();
var controller = new ControllerChampions(new StubData());
var logger = new NullLogger<ControllerChampions>();
var controller = new ControllerChampions(data, logger);
var champDTO = new ChampionDTO(name, bio);
// Act

Loading…
Cancel
Save