Ajout d'une correction possible
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
using MiniJeuxFinal.Games.PierrePapierCiseaux.Actions;
|
||||
using NFluent;
|
||||
|
||||
namespace MiniJeuxFinal.Test.Games.PierrePapierCiseaux.Actions
|
||||
{
|
||||
public class PaperActionTest
|
||||
{
|
||||
private PaperAction CreateTarget() => new PaperAction();
|
||||
|
||||
|
||||
|
||||
[Fact]
|
||||
public void Should_init()
|
||||
{
|
||||
var target = CreateTarget();
|
||||
Check.That(target.Name).IsEqualTo("Papier");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Should_win()
|
||||
{
|
||||
var target = CreateTarget();
|
||||
Check.That(target.ToWin(new StoneAction())).IsTrue();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Should_loose()
|
||||
{
|
||||
var target = CreateTarget();
|
||||
Check.That(target.ToWin(new ScissorsAction())).IsFalse();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
using MiniJeuxFinal.Games.PierrePapierCiseaux.Actions;
|
||||
using NFluent;
|
||||
|
||||
namespace MiniJeuxFinal.Test.Games.PierrePapierCiseaux.Actions
|
||||
{
|
||||
public class ScissorsActionTest
|
||||
{
|
||||
private ScissorsAction CreateTarget() => new ScissorsAction();
|
||||
|
||||
|
||||
|
||||
[Fact]
|
||||
public void Should_init()
|
||||
{
|
||||
var target = CreateTarget();
|
||||
Check.That(target.Name).IsEqualTo("Ciseaux");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Should_win()
|
||||
{
|
||||
var target = CreateTarget();
|
||||
Check.That(target.ToWin(new PaperAction())).IsTrue();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Should_loose()
|
||||
{
|
||||
var target = CreateTarget();
|
||||
Check.That(target.ToWin(new StoneAction())).IsFalse();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
using MiniJeuxFinal.Games.PierrePapierCiseaux.Actions;
|
||||
using NFluent;
|
||||
|
||||
namespace MiniJeuxFinal.Test.Games.PierrePapierCiseaux.Actions
|
||||
{
|
||||
public class StoneActionTest
|
||||
{
|
||||
private StoneAction CreateTarget() => new StoneAction();
|
||||
|
||||
|
||||
|
||||
[Fact]
|
||||
public void Should_init()
|
||||
{
|
||||
var target = CreateTarget();
|
||||
Check.That(target.Name).IsEqualTo("Pierre");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Should_win()
|
||||
{
|
||||
var target = CreateTarget();
|
||||
Check.That(target.ToWin(new ScissorsAction())).IsTrue();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Should_loose()
|
||||
{
|
||||
var target = CreateTarget();
|
||||
Check.That(target.ToWin(new PaperAction())).IsFalse();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user