diff --git a/Sources/MaSoluction/Data/Stub.cs b/Sources/MaSoluction/Data/Stub.cs index 99a3c4a..017a740 100644 --- a/Sources/MaSoluction/Data/Stub.cs +++ b/Sources/MaSoluction/Data/Stub.cs @@ -23,6 +23,8 @@ namespace Data public List GetDices() { + AddDice( new NumberDie("de1", 2, 6)); + AddDice(new NumberDie("de2", 1, 6)); return listDice; } diff --git a/Sources/MaSoluction/Model/Game.cs b/Sources/MaSoluction/Model/Game.cs index 5dc35b9..c10d675 100644 --- a/Sources/MaSoluction/Model/Game.cs +++ b/Sources/MaSoluction/Model/Game.cs @@ -32,7 +32,9 @@ namespace Model this.listDice.AddRange(listDice); ListDice = new ReadOnlyCollection(this.listDice); } - + /// + /// Constructor Game + /// public string Name { get diff --git a/Sources/MaSoluction/Model/Manager.cs b/Sources/MaSoluction/Model/Manager.cs index e145817..51f6345 100644 --- a/Sources/MaSoluction/Model/Manager.cs +++ b/Sources/MaSoluction/Model/Manager.cs @@ -28,8 +28,11 @@ namespace Model { dataManager.RemoveDice(removeD); } - - + + public List GetDice() + { + return dataManager.GetDices(); + } } } diff --git a/Sources/MaSoluction/Testeur/TesterStub.cs b/Sources/MaSoluction/Testeur/TesterStub.cs index f2d0fd1..53f4373 100644 --- a/Sources/MaSoluction/Testeur/TesterStub.cs +++ b/Sources/MaSoluction/Testeur/TesterStub.cs @@ -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); + } } }