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.
49 lines
1.4 KiB
49 lines
1.4 KiB
using ParionsCuite.Modeles;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace TestParionsCuite
|
|
{
|
|
public class TestPari
|
|
{
|
|
[Fact]
|
|
public void TestParierToString()
|
|
{
|
|
// Arrange
|
|
Inviter i1 = new Inviter("John");
|
|
Inviter i2 = new Inviter("Jane");
|
|
string but = "Who will score the first goal?";
|
|
string enjeu = "50 dollars";
|
|
Parier parier = new Parier(i1, i2, but, enjeu);
|
|
string expectedToString = "joueur n°1 : John, \njoueur n°2 : Jane, \nbut : Who will score the first goal?, enjeux : 50 dollars";
|
|
|
|
// Act
|
|
string actualToString = parier.ToString();
|
|
|
|
// Assert
|
|
Assert.Equal(expectedToString, actualToString);
|
|
}
|
|
|
|
[Fact]
|
|
public void TestParierEquals()
|
|
{
|
|
// Arrange
|
|
Inviter i1 = new Inviter("John");
|
|
Inviter i2 = new Inviter("Jane");
|
|
string but = "Who will score the first goal?";
|
|
string enjeu = "50 dollars";
|
|
Parier parier1 = new Parier(i1, i2, but, enjeu);
|
|
Parier parier2 = new Parier(i1, i2, but, enjeu);
|
|
Parier parier3 = new Parier(i2, i1, but, enjeu);
|
|
|
|
// Act & Assert
|
|
Assert.NotEqual(parier1, parier3);
|
|
Assert.NotEqual(parier2, parier3);
|
|
|
|
}
|
|
}
|
|
}
|