From 69b961014cbf22260fa9c3e67993701fb0e78cbb Mon Sep 17 00:00:00 2001 From: Jade_VAN_BRABANDT Date: Wed, 17 May 2023 19:09:29 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20:=20Test=20&=20Build=20:=20Fonctionnement?= =?UTF-8?q?=20des=20tags;=20contenue=20de=200=20=20=C3=A0=203?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Sources/Stim.Model/Game.cs | 2 +- Sources/TestProject1/TestGame.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/Stim.Model/Game.cs b/Sources/Stim.Model/Game.cs index 9a0707b..064d046 100644 --- a/Sources/Stim.Model/Game.cs +++ b/Sources/Stim.Model/Game.cs @@ -59,7 +59,7 @@ namespace Model get => tags; set { - if (value == null || value.Count != 3) return; + if (value == null || value.Count > 3) return; tags = value; } } diff --git a/Sources/TestProject1/TestGame.cs b/Sources/TestProject1/TestGame.cs index 2592286..5396251 100644 --- a/Sources/TestProject1/TestGame.cs +++ b/Sources/TestProject1/TestGame.cs @@ -66,7 +66,7 @@ namespace Test Game game3 = new("name", "description", 2012, new List {"1","2"}, "cover"); Assert.NotNull(game3.Tags); - Assert.Empty(game3.Tags); + Assert.Equal(2,game3.Tags.Count); } [Fact] @@ -134,7 +134,7 @@ namespace Test Game game = new("name", "description", 2012, new List { "1", "2", "3" }, "cover"); game.NameChange("newName"); game.TagChange(new List { "1", "2" }); - Assert.Empty(game.Tags); + Assert.Equal(3, game.Tags.Count); } [Fact]