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.
41 lines
1.1 KiB
41 lines
1.1 KiB
using Model.Stub;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace TestProject1
|
|
{
|
|
public class StubPersonnageTests
|
|
{
|
|
[Fact]
|
|
public void RecupererPersonnage_ReturnsPersonnageList()
|
|
{
|
|
// Arrange
|
|
var stubPersonnage = new StubPersonnage();
|
|
|
|
// Act
|
|
var personnages = stubPersonnage.RecupererPersonnage();
|
|
|
|
// Assert
|
|
Assert.NotNull(personnages);
|
|
|
|
}
|
|
|
|
[Fact]
|
|
public void RecupererPersonnage_ContainsSpecificPersonnage()
|
|
{
|
|
var stubPersonnage = new StubPersonnage();
|
|
var personnages = stubPersonnage.RecupererPersonnage();
|
|
var luffy = personnages.FirstOrDefault(p => p.Nom == "Luffy");
|
|
Assert.NotNull(luffy);
|
|
Assert.True(3000000000== luffy.Prime);
|
|
Assert.True("Luffy au Chapeau de Paille" == luffy.Epithete);
|
|
Assert.True(19 == luffy.Age);
|
|
Assert.True(1.74 == luffy.Taille);
|
|
|
|
}
|
|
}
|
|
}
|