UT_RemoveDice 🧪
continuous-integration/drone/push Build is passing Details

pull/3/head
nalambaraa 3 years ago
parent f38f98d393
commit cbd5f0739f

@ -23,6 +23,8 @@ namespace Data
public List<Die> GetDices()
{
AddDice( new NumberDie("de1", 2, 6));
AddDice(new NumberDie("de2", 1, 6));
return listDice;
}

@ -32,7 +32,9 @@ namespace Model
this.listDice.AddRange(listDice);
ListDice = new ReadOnlyCollection<NumberDie>(this.listDice);
}
/// <summary>
/// Constructor Game
/// </summary>
public string Name
{
get

@ -28,8 +28,11 @@ namespace Model
{
dataManager.RemoveDice(removeD);
}
public List<Die> GetDice()
{
return dataManager.GetDices();
}
}
}

@ -21,5 +21,18 @@ namespace Testeur
//Assert
Assert.Equal("de1", nd.Name);
}
[Fact]
public void TesterRemoveManager()
{
//Arange
Manager m = new Manager(new Stub());
int n = m.GetDice().Count();
NumberDie nd = new NumberDie("de1", 2, 6);
// Acct
m.RemoveDice(nd);
//Assert
Assert.NotEqual(n, m.GetDice().Count);
}
}
}

Loading…
Cancel
Save