From c61ffeb783602f237a310396e115bbe57b9dfd0a Mon Sep 17 00:00:00 2001 From: Alexis DRAI Date: Wed, 19 Oct 2022 10:23:15 +0200 Subject: [PATCH] :bug: Replace Equals with SequenceEqual still not foolproof, since Die and Face don't redefine equals etc. the reason why all the tests pass is because we don't have UTs for DiceGroupManager --- Sources/Model/Dice/DiceGroupManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Model/Dice/DiceGroupManager.cs b/Sources/Model/Dice/DiceGroupManager.cs index 608a04d..1d0ccc5 100644 --- a/Sources/Model/Dice/DiceGroupManager.cs +++ b/Sources/Model/Dice/DiceGroupManager.cs @@ -69,7 +69,7 @@ namespace Model.Dice public Task Update(DiceGroup before, DiceGroup after) { // pas autorisé de changer les dés, juste le nom - if (!before.Dice.Equals(after.Dice)) + if (!before.Dice.SequenceEqual(after.Dice)) { throw new ArgumentException("the group of dice cannot be updated, only the name", nameof(before)); }