diff --git a/Sources/ConsoleApp/Program.cs b/Sources/ConsoleApp/Program.cs index 5f7a9dc..50becb7 100644 --- a/Sources/ConsoleApp/Program.cs +++ b/Sources/ConsoleApp/Program.cs @@ -1,9 +1,7 @@ using CoreLibrary.Manageurs; -using CoreLibrary.Persistance; using CoreLibrary.Regles; using CoreLibrary; using System.Diagnostics.CodeAnalysis; -using CoreLibrary.Joueurs; using Persistance.Persistance; namespace ConsoleApp diff --git a/Sources/CoreLibrary/Evenements/PartiePartieTermineeEventArgs.cs b/Sources/CoreLibrary/Evenements/PartiePartieTermineeEventArgs.cs index 40bc609..946b45e 100644 --- a/Sources/CoreLibrary/Evenements/PartiePartieTermineeEventArgs.cs +++ b/Sources/CoreLibrary/Evenements/PartiePartieTermineeEventArgs.cs @@ -1,6 +1,4 @@ -using CoreLibrary.Joueurs; - -namespace CoreLibrary.Evenements +namespace CoreLibrary.Evenements { /// /// Classe contenant les arguments passés en paramètre lors de l'événement PartiePartieTerminee. diff --git a/Sources/CoreLibrary/Joueurs/Joueur.cs b/Sources/CoreLibrary/Joueurs/Joueur.cs index 7ae83b7..86bd486 100644 --- a/Sources/CoreLibrary/Joueurs/Joueur.cs +++ b/Sources/CoreLibrary/Joueurs/Joueur.cs @@ -1,5 +1,4 @@ -using CoreLibrary.Exceptions; -using CoreLibrary.Persistance; +using CoreLibrary.Persistance; using CoreLibrary.Evenements; using CoreLibrary.Regles; using CoreLibrary.Statistiques; diff --git a/Sources/CoreLibrary/Manageurs/Manageur.cs b/Sources/CoreLibrary/Manageurs/Manageur.cs index accc11b..d0d2ece 100644 --- a/Sources/CoreLibrary/Manageurs/Manageur.cs +++ b/Sources/CoreLibrary/Manageurs/Manageur.cs @@ -2,7 +2,6 @@ using CoreLibrary.Persistance; using CoreLibrary.Joueurs; using CoreLibrary.Regles; using CoreLibrary.Statistiques; -using CoreLibrary.Core; namespace CoreLibrary.Manageurs { diff --git a/Sources/UnitTesting/CodeCompletExceptionUT.cs b/Sources/UnitTesting/CodeCompletExceptionUT.cs index 0ac5325..6388e59 100644 --- a/Sources/UnitTesting/CodeCompletExceptionUT.cs +++ b/Sources/UnitTesting/CodeCompletExceptionUT.cs @@ -7,14 +7,23 @@ using Xunit; namespace UnitTesting { + /// + /// Classe de test de l'exception CodeCompletException. + /// public class CodeCompletExceptionUT - { + { + /// + /// Test de l'exception CodeCompletException par defaut. + /// [Fact] public void ExceptionDefaut() { Assert.ThrowsAsync(() => throw new CodeCompletException()); - } - + } + + /// + /// Test du message de l'exception CodeCompletException. + /// [Fact] public void ExceptionMessage() { @@ -30,8 +39,11 @@ namespace UnitTesting { Assert.Equal(message, e.Message); } - } - + } + + /// + /// Test de l'exception CodeCompletException et de ses messages. + /// [Fact] public void ExceptionMessageEtException() { @@ -52,8 +64,11 @@ namespace UnitTesting Assert.IsType(e.InnerException); Assert.Equal(message2, e.InnerException.Message); } - } - + } + + /// + /// Test de la serialisation de l'exception CodeCompletException. + /// [Fact] public void ExceptionSerialisation() { diff --git a/Sources/UnitTesting/CodeIncompletExceptionUT.cs b/Sources/UnitTesting/CodeIncompletExceptionUT.cs index 0476bb1..a904f58 100644 --- a/Sources/UnitTesting/CodeIncompletExceptionUT.cs +++ b/Sources/UnitTesting/CodeIncompletExceptionUT.cs @@ -5,14 +5,23 @@ using Xunit; namespace UnitTesting { + /// + /// Classe de test de l'exception CodeIncompletException. + /// public class CodeIncompletExceptionUT - { + { + /// + /// Test de l'exception CodeIncompletException par defaut. + /// [Fact] public void ExceptionDefaut() { Assert.ThrowsAsync(() => throw new CodeIncompletException()); - } - + } + + /// + /// Test du message de l'exception CodeIncompletException. + /// [Fact] public void ExceptionMessage() { @@ -28,8 +37,11 @@ namespace UnitTesting { Assert.Equal(message, e.Message); } - } - + } + + /// + /// Test de l'exception CodeIncompletException et de ses messages. + /// [Fact] public void ExceptionMessageEtException() { @@ -50,8 +62,11 @@ namespace UnitTesting Assert.IsType(e.InnerException); Assert.Equal(message2, e.InnerException.Message); } - } - + } + + /// + /// Test de la serialisation de l'exception CodeIncompletException. + /// [Fact] public void ExceptionSerialisation() { diff --git a/Sources/UnitTesting/CodeInvalideExceptionUT.cs b/Sources/UnitTesting/CodeInvalideExceptionUT.cs index 87242c6..3d41ea8 100644 --- a/Sources/UnitTesting/CodeInvalideExceptionUT.cs +++ b/Sources/UnitTesting/CodeInvalideExceptionUT.cs @@ -5,14 +5,23 @@ using Xunit; namespace UnitTesting { + /// + /// Classe de test de l'exception CodeInvalideException. + /// public class CodeInvalideExceptionUT - { + { + /// + /// Test de l'exception CodeInvalideException par defaut. + /// [Fact] public void ExceptionDefaut() { Assert.ThrowsAsync(() => throw new CodeInvalideException()); - } - + } + + /// + /// Test des attributs de l'exception CodeInvalideException. + /// [Fact] public void ExceptionAttributs() { @@ -27,8 +36,11 @@ namespace UnitTesting Assert.Contains("3", e.Message); Assert.Contains("4", e.Message); } - } - + } + + /// + /// Test du message de l'exception CodeInvalideException. + /// [Fact] public void ExceptionMessage() { @@ -44,8 +56,11 @@ namespace UnitTesting { Assert.Equal(message, e.Message); } - } - + } + + /// + /// Test de l'exception CodeInvalideException et de ses messages. + /// [Fact] public void ExceptionMessageEtException() { @@ -66,8 +81,11 @@ namespace UnitTesting Assert.IsType(e.InnerException); Assert.Equal(message2, e.InnerException.Message); } - } - + } + + /// + /// Test de la serialisation de l'exception CodeInvalideException. + /// [Fact] public void ExceptionSerialisation() { diff --git a/Sources/UnitTesting/CodeUT.cs b/Sources/UnitTesting/CodeUT.cs index 3b44478..ec1e54d 100644 --- a/Sources/UnitTesting/CodeUT.cs +++ b/Sources/UnitTesting/CodeUT.cs @@ -6,15 +6,15 @@ using Xunit; namespace UnitTesting { /// - /// + /// Classe de test pour la classe Code. /// public class CodeUT { /// - /// + /// Test du constructeur de Code valide. /// [Fact] - public void TestPremierConstructeurValide() + public void TestConstructeurValide() { Code code = new Code(4); Assert.NotNull(code); @@ -25,16 +25,16 @@ namespace UnitTesting } /// - /// + /// Test du constructeur de Code invalide. /// [Fact] - public void TestPremierConstructeurInvalide() + public void TestConstructeurInvalide() { Assert.Throws(() => new Code(-1)); } /// - /// + /// Test de la methode AjouterJeton valide. /// [Fact] public void TestAjouterJetonValide() @@ -47,7 +47,7 @@ namespace UnitTesting } /// - /// + /// Test de la methode AjouterJeton invalide. /// [Fact] public void TestAjouterJetonInvalide() @@ -61,7 +61,7 @@ namespace UnitTesting } /// - /// + /// Test de la methode SupprimerDernierJeton valide. /// [Fact] public void TestSupprimerDernierJetonValide() @@ -76,7 +76,7 @@ namespace UnitTesting } /// - /// + /// Test de la methode SupprimerDernierJeton invalide. /// [Fact] public void TestSupprimerDernierJetonInvalide() @@ -86,7 +86,7 @@ namespace UnitTesting } /// - /// + /// Test de la methode RecupereJeton valide. /// [Fact] public void TestRecupererJetonValide() @@ -102,7 +102,7 @@ namespace UnitTesting } /// - /// + /// Test de la methode RecupereJeton invalide. /// [Fact] public void TestRecupererJetonInvalide() @@ -113,7 +113,7 @@ namespace UnitTesting } /// - /// + /// Test de la methode RecupererJeton avec exception. /// [Fact] public void TestRecupererJetonNull() @@ -123,7 +123,7 @@ namespace UnitTesting } /// - /// + /// Test que les jetons soient les memes que ceux choisit. /// [Fact] public void TestJetonsValide() @@ -146,7 +146,7 @@ namespace UnitTesting } /// - /// + /// Test de la methode EstComplet valide. /// [Fact] public void TestEstCompletValide() @@ -161,7 +161,7 @@ namespace UnitTesting } /// - /// + /// Test de la methode EstComplet invalide. /// [Fact] public void TestEstCompletInvalide() @@ -172,7 +172,7 @@ namespace UnitTesting } /// - /// + /// Test de la methode TailleMaximale valide. /// [Fact] public void TestTailleMaximaleValide() @@ -188,7 +188,7 @@ namespace UnitTesting } /// - /// + /// Test de la methode Comparer valide. /// [Fact] public void TestComparerValide() @@ -211,7 +211,7 @@ namespace UnitTesting } /// - /// + /// Test de la methode Comparer ou le resultat est different. /// [Fact] public void TestComparerDifferent() @@ -234,7 +234,7 @@ namespace UnitTesting } /// - /// + /// Test de la methode Comparer ou le mon code est incomplet. /// [Fact] public void TestComparerMonCodeIncomplet() @@ -253,7 +253,7 @@ namespace UnitTesting } /// - /// + /// Test de la methode Comparer ou le son code est incomplet. /// [Fact] public void TestComparerSonCodeIncomplet() @@ -270,7 +270,7 @@ namespace UnitTesting } /// - /// + /// Test de la methode ToString de la classe Code. /// [Fact] public void TestToString() @@ -285,7 +285,7 @@ namespace UnitTesting } /// - /// + /// Test de la methode Comparer ou le code est invalide. /// [Fact] public void TestComparerCodeInvalide() @@ -300,7 +300,7 @@ namespace UnitTesting } /// - /// + /// Test de la methode Comparer ou le code est correct. /// [Fact] public void TestComparerCodeCorrect() diff --git a/Sources/UnitTesting/CodeVideExceptionUT.cs b/Sources/UnitTesting/CodeVideExceptionUT.cs index 2ad8544..a77dc77 100644 --- a/Sources/UnitTesting/CodeVideExceptionUT.cs +++ b/Sources/UnitTesting/CodeVideExceptionUT.cs @@ -4,15 +4,24 @@ using System.Runtime.Serialization; using Xunit; namespace UnitTesting -{ +{ + /// + /// Classe de test de l'exception CodeVideException. + /// public class CodeVideExceptionUT { + /// + /// Test de l'exception CodeVideException par defaut. + /// [Fact] public void ExceptionDefaut() { Assert.ThrowsAsync(() => throw new CodeVideException()); } + /// + /// Test du message de l'exception CodeVideException. + /// [Fact] public void ExceptionMessage() { @@ -30,6 +39,9 @@ namespace UnitTesting } } + /// + /// Test de l'exception CodeVideException et de ses messages. + /// [Fact] public void ExceptionMessageEtException() { @@ -52,6 +64,9 @@ namespace UnitTesting } } + /// + /// Test de la serialisation de l'exception CodeVideException. + /// [Fact] public void ExceptionSerialisation() { diff --git a/Sources/UnitTesting/DemanderNomEventArgsUT.cs b/Sources/UnitTesting/DemanderNomEventArgsUT.cs index 311226a..3ae4fb1 100644 --- a/Sources/UnitTesting/DemanderNomEventArgsUT.cs +++ b/Sources/UnitTesting/DemanderNomEventArgsUT.cs @@ -4,8 +4,14 @@ using Xunit; namespace UnitTesting { + /// + /// Classe de test de l'evenement DemanderNomEventArgs. + /// public class DemanderNomEventArgsUT - { + { + /// + /// Test du constructeur de l'evenement DemanderNomEventArgs valide. + /// [Fact] public void TestConstructeurValide() { diff --git a/Sources/UnitTesting/GrilleCompleteExceptionUT.cs b/Sources/UnitTesting/GrilleCompleteExceptionUT.cs index c083a7d..bf4bf99 100644 --- a/Sources/UnitTesting/GrilleCompleteExceptionUT.cs +++ b/Sources/UnitTesting/GrilleCompleteExceptionUT.cs @@ -4,15 +4,24 @@ using System.Runtime.Serialization; using Xunit; namespace UnitTesting -{ +{ + /// + /// Classe de test de l'exception GrilleCompleteException. + /// public class GrilleCompleteExceptionUT { + /// + /// Test de l'exception GrilleCompleteException par defaut. + /// [Fact] public void ExceptionDefaut() { Assert.ThrowsAsync(() => throw new GrilleCompleteException()); } + /// + /// Test du message de l'exception GrilleCompleteException. + /// [Fact] public void ExceptionMessage() { @@ -30,6 +39,9 @@ namespace UnitTesting } } + /// + /// Test de l'exception GrilleCompleteException et de ses messages. + /// [Fact] public void ExceptionMessageEtException() { @@ -52,6 +64,9 @@ namespace UnitTesting } } + /// + /// Test de la serialisation de l'evenement GrilleCompleteException. + /// [Fact] public void ExceptionSerialisation() { diff --git a/Sources/UnitTesting/IndiceCodeExceptionUT.cs b/Sources/UnitTesting/IndiceCodeExceptionUT.cs index a14c524..d311d7f 100644 --- a/Sources/UnitTesting/IndiceCodeExceptionUT.cs +++ b/Sources/UnitTesting/IndiceCodeExceptionUT.cs @@ -4,15 +4,24 @@ using System.Runtime.Serialization; using Xunit; namespace UnitTesting -{ +{ + /// + /// Classe de test de l'exception IndiceCodeException. + /// public class IndiceCodeExceptionUT { + /// + /// Test de l'exception IndiceCodeException par defaut. + /// [Fact] public void ExceptionDefaut() { Assert.ThrowsAsync(() => throw new IndiceCodeException()); } + /// + /// Test des attributs de l'exception IndiceCodeException. + /// [Fact] public void ExceptionAttributs() { @@ -29,6 +38,9 @@ namespace UnitTesting } } + /// + /// Test du message de l'exception IndiceCodeException. + /// [Fact] public void ExceptionMessage() { @@ -46,6 +58,9 @@ namespace UnitTesting } } + /// + /// Test de l'exception IndiceCodeException et de ses messages. + /// [Fact] public void ExceptionMessageEtException() { @@ -68,6 +83,9 @@ namespace UnitTesting } } + /// + /// Test de la serialisation de l'evenement IndiceCodeException. + /// [Fact] public void ExceptionSerialisation() { diff --git a/Sources/UnitTesting/JetonUT.cs b/Sources/UnitTesting/JetonUT.cs index 7fd6d03..c01cab9 100644 --- a/Sources/UnitTesting/JetonUT.cs +++ b/Sources/UnitTesting/JetonUT.cs @@ -4,12 +4,12 @@ using Xunit; namespace UnitTesting { /// - /// + /// Classe de test pour la classe Jeton. /// public class JetonUT { /// - /// + /// Test du constructeur de Jeton. /// [Fact] public void TestConstructeurValide() @@ -24,7 +24,7 @@ namespace UnitTesting } /// - /// + /// Test pour verifier que des jetons soient égaux. /// [Fact] public void TestEquals() diff --git a/Sources/UnitTesting/JoueurDejaPresentExceptionUT.cs b/Sources/UnitTesting/JoueurDejaPresentExceptionUT.cs index d6b3975..2246eb5 100644 --- a/Sources/UnitTesting/JoueurDejaPresentExceptionUT.cs +++ b/Sources/UnitTesting/JoueurDejaPresentExceptionUT.cs @@ -4,15 +4,24 @@ using System.Runtime.Serialization; using Xunit; namespace UnitTesting -{ +{ + /// + /// Classe de test de l'exception JoueurDejaPresentException. + /// public class JoueurDejaPresentExceptionUT { + /// + /// Test de l'exception JoueurDejaPresentException par defaut. + /// [Fact] public void ExceptionDefaut() { Assert.ThrowsAsync(() => throw new JoueurDejaPresentException()); } + /// + /// Test du message de l'exception JoueurDejaPresentException. + /// [Fact] public void ExceptionMessage() { @@ -30,6 +39,9 @@ namespace UnitTesting } } + /// + /// Test de l'exception JoueurDejaPresentException et ses messages. + /// [Fact] public void ExceptionMessageEtException() { @@ -52,6 +64,9 @@ namespace UnitTesting } } + /// + /// Test de la serilisation de l'exception JoueurDejaPresentException. + /// [Fact] public void ExceptionSerialisation() { diff --git a/Sources/UnitTesting/JoueurJouerEventArgsUT.cs b/Sources/UnitTesting/JoueurJouerEventArgsUT.cs index 3277a51..19e5ea1 100644 --- a/Sources/UnitTesting/JoueurJouerEventArgsUT.cs +++ b/Sources/UnitTesting/JoueurJouerEventArgsUT.cs @@ -4,8 +4,14 @@ using CoreLibrary.Evenements; namespace UnitTesting { + /// + /// Classe de test de l'evenement JoueurJouerEventArgs. + /// public class JoueurJouerEventArgsUT - { + { + /// + /// Test du constructeur de l'evenement JoueurJouerEventArgs valide. + /// [Fact] public void TestConstructeurValide() { diff --git a/Sources/UnitTesting/JoueurSeConnecterEventArgsUT.cs b/Sources/UnitTesting/JoueurSeConnecterEventArgsUT.cs index d3b8c0b..6310f0d 100644 --- a/Sources/UnitTesting/JoueurSeConnecterEventArgsUT.cs +++ b/Sources/UnitTesting/JoueurSeConnecterEventArgsUT.cs @@ -4,8 +4,14 @@ using Xunit; namespace UnitTesting { + /// + /// Classe de test de l'evenement JoueurSeConnecterEventArgs. + /// public class JoueurSeConnecterEventArgsUT - { + { + /// + /// Test du constructeur de l'evenement valide. + /// [Fact] public void TestConstructeurValide() { diff --git a/Sources/UnitTesting/JoueurUT.cs b/Sources/UnitTesting/JoueurUT.cs index 3cfdd81..896b3fd 100644 --- a/Sources/UnitTesting/JoueurUT.cs +++ b/Sources/UnitTesting/JoueurUT.cs @@ -10,12 +10,12 @@ using Xunit; namespace UnitTesting { /// - /// + /// Classe de test de la classe Joueur. /// public class JoueurUT { /// - /// + /// Test le premier constructeur d'un joueur. /// [Fact] public void TestConstructeur1Valide() @@ -29,7 +29,7 @@ namespace UnitTesting } /// - /// + /// Test le deuxieme constructeur d'un joueur. /// [Fact] public void TestConstructeur2Valide() @@ -43,7 +43,7 @@ namespace UnitTesting } /// - /// + /// Test de l'événement JoueurSeConnecterEventArgs. /// [Fact] public void TestQuandJoueurSeConnecter() @@ -68,7 +68,7 @@ namespace UnitTesting } /// - /// + /// Test de la methode SeConnecter de la classe Joueur. /// [Fact] public void TestSeConnecterDeclencheEvenement() @@ -92,7 +92,7 @@ namespace UnitTesting } /// - /// + /// Test la methode ToString valide de la classe Joueur. /// [Fact] public void TestToStringValide() @@ -104,7 +104,7 @@ namespace UnitTesting } /// - /// + /// Test de la methode ToString vide, de la classe Joueur. /// [Fact] public void TestToStringVide() @@ -116,7 +116,7 @@ namespace UnitTesting } /// - /// + /// Test la methode Statistique sans incrementation. /// [Fact] public void TestStatistiqueNonDefinie() @@ -131,7 +131,7 @@ namespace UnitTesting } /// - /// + /// Test la methode Statistique avec incrementation. /// [Fact] public void TestStatistiqueDefinie() @@ -147,7 +147,7 @@ namespace UnitTesting } /// - /// + /// Test de la methode IncrementerSStatistique avec une incrementation. /// [Fact] public void TestIncrementerStatistiqueUn() @@ -163,7 +163,7 @@ namespace UnitTesting } /// - /// + /// Test de la methode IncrementerSStatistique avec deux incrementation. /// [Fact] public void TestIncrementerStatistiqueDeux() @@ -179,7 +179,9 @@ namespace UnitTesting Assert.Equal(2, result); } - + /// + /// Test de l'evenement QuandJoueurSeConnecter de la classe Joueur. + /// [Fact] public void TestJoueurEcoute() { diff --git a/Sources/UnitTesting/ManageurUT.cs b/Sources/UnitTesting/ManageurUT.cs index a24e089..94e59cc 100644 --- a/Sources/UnitTesting/ManageurUT.cs +++ b/Sources/UnitTesting/ManageurUT.cs @@ -36,7 +36,7 @@ namespace UnitTesting } /// - /// Test la méthode Sauvegarder d'une partie. + /// Test la methode Sauvegarder d'une partie. /// [Fact] public void TestSauvegarder() @@ -50,7 +50,7 @@ namespace UnitTesting } /// - /// Test la méthode ChargerPartie qui charge une partie. + /// Test la methode ChargerPartie qui charge une partie. /// [Fact] public void TestChargerPartie() @@ -70,7 +70,7 @@ namespace UnitTesting } /// - /// Test la méthode NouvellePartie de Manageur. + /// Test la methode NouvellePartie de Manageur. /// [Fact] public void TestNouvellePartie() @@ -85,7 +85,7 @@ namespace UnitTesting } /// - /// Premier test de la méthode EcouterPartie de Manageur. + /// Premier test de la methode EcouterPartie de Manageur. /// [Fact] public void TestEcouterPartie() @@ -175,7 +175,7 @@ namespace UnitTesting } /// - /// Deuxième test de la méthode EcouterPartie de Manageur. + /// Deuxieme test de la methode EcouterPartie de Manageur. /// [Fact] public void TestEcouterPartie2() @@ -227,7 +227,7 @@ namespace UnitTesting } /// - /// Troisième test de la méthode EcouterPartie de Manageur. + /// Troisieme test de la methode EcouterPartie de Manageur. /// [Fact] public void TestEcouterPartie3() @@ -279,7 +279,7 @@ namespace UnitTesting } /// - /// Quatrième test de la méthode EcouterPartie de Manageur. + /// Quatrieme test de la methode EcouterPartie de Manageur. /// [Fact] public void TestEcouterPartie4() @@ -331,7 +331,7 @@ namespace UnitTesting } /// - /// Cinquième test de la méthode EcouterPartie de Manageur. + /// Cinquieme test de la methode EcouterPartie de Manageur. /// [Fact] public void TestEcouterPartie5() @@ -383,7 +383,7 @@ namespace UnitTesting } /// - /// Test de la méthode DemanderJoueurExistant de Manageur. + /// Test de la methode DemanderJoueurExistant de Manageur. /// [Fact] public void TestDemanderJoueurExistant() @@ -403,7 +403,7 @@ namespace UnitTesting } /// - /// Test de la méthode DemanderJoueur de Manageur. + /// Test de la methode DemanderJoueur de Manageur. /// [Fact] public void TestDemanderJoueur() diff --git a/Sources/UnitTesting/NomJoueurInterditExceptionUT.cs b/Sources/UnitTesting/NomJoueurInterditExceptionUT.cs index 6659841..37469ad 100644 --- a/Sources/UnitTesting/NomJoueurInterditExceptionUT.cs +++ b/Sources/UnitTesting/NomJoueurInterditExceptionUT.cs @@ -4,15 +4,24 @@ using System.Runtime.Serialization; using Xunit; namespace UnitTesting -{ +{ + /// + /// Classe de test pour l'exception NomJoueurInterditException. + /// public class NomJoueurInterditExceptionUT { + /// + /// Test de l'exception NomJoueurInterditException par defaut. + /// [Fact] public void ExceptionDefaut() { Assert.ThrowsAsync(() => throw new NomJoueurInterditException()); } + /// + /// Test du message de l'exception NomJoueurInterditException. + /// [Fact] public void ExceptionMessage() { @@ -30,6 +39,9 @@ namespace UnitTesting } } + /// + /// Test de l'exception NomJoueurInterditException et de ses messages. + /// [Fact] public void ExceptionMessageEtException() { @@ -52,6 +64,9 @@ namespace UnitTesting } } + /// + /// Test de la serilisation de l'exception NomJoueurInterditException. + /// [Fact] public void ExceptionSerialisation() { diff --git a/Sources/UnitTesting/PartieDebutPartieEventArgsUT.cs b/Sources/UnitTesting/PartieDebutPartieEventArgsUT.cs deleted file mode 100644 index 5737642..0000000 --- a/Sources/UnitTesting/PartieDebutPartieEventArgsUT.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace UnitTesting -{ - internal class PartieDebutPartieEventArgsUT - { - } -} diff --git a/Sources/UnitTesting/PartieDemanderJoueurEventArgsUT.cs b/Sources/UnitTesting/PartieDemanderJoueurEventArgsUT.cs index cf0e7cc..83fe2bd 100644 --- a/Sources/UnitTesting/PartieDemanderJoueurEventArgsUT.cs +++ b/Sources/UnitTesting/PartieDemanderJoueurEventArgsUT.cs @@ -4,8 +4,14 @@ using Xunit; namespace UnitTesting { + /// + /// Classe de test de l'evenement PartieDemanderJoueurEventArgs. + /// public class PartieDemanderJoueurEventArgsUT - { + { + /// + /// Test du constructeur de l'evenement valide. + /// [Fact] public void TestConstructeurValide() { diff --git a/Sources/UnitTesting/PartieDemanderJoueurJouerEventArgsUT.cs b/Sources/UnitTesting/PartieDemanderJoueurJouerEventArgsUT.cs index 0dd6810..96c7c10 100644 --- a/Sources/UnitTesting/PartieDemanderJoueurJouerEventArgsUT.cs +++ b/Sources/UnitTesting/PartieDemanderJoueurJouerEventArgsUT.cs @@ -4,8 +4,14 @@ using Xunit; namespace UnitTesting { + /// + /// Classe de test de l'evenement PartieDemanderJoueurJouerEventArgs. + /// public class PartieDemanderJoueurJouerEventArgsUT { + /// + /// Test du constructeur de l'evenement valide. + /// [Fact] public void TestConstructeurValide() { diff --git a/Sources/UnitTesting/PartieNouveauTourEventArgsUT.cs b/Sources/UnitTesting/PartieNouveauTourEventArgsUT.cs index 11f2dff..df30547 100644 --- a/Sources/UnitTesting/PartieNouveauTourEventArgsUT.cs +++ b/Sources/UnitTesting/PartieNouveauTourEventArgsUT.cs @@ -5,8 +5,14 @@ using Xunit; namespace UnitTesting { + /// + /// Classe de test de l'evenement PartieNouveauTourEventArgs. + /// public class PartieNouveauTourEventArgsUT - { + { + /// + /// Test du constructeur de l'evenement valide. + /// [Fact] public void TestConstructeurValide() { diff --git a/Sources/UnitTesting/PartiePartieTermineeEventArgsUT.cs b/Sources/UnitTesting/PartiePartieTermineeEventArgsUT.cs index 262eed0..409b10b 100644 --- a/Sources/UnitTesting/PartiePartieTermineeEventArgsUT.cs +++ b/Sources/UnitTesting/PartiePartieTermineeEventArgsUT.cs @@ -1,11 +1,16 @@ - -using CoreLibrary.Evenements; +using CoreLibrary.Evenements; using Xunit; namespace UnitTesting { + /// + /// Classe de test de l'evenement PartiePartieTermineeEventArgs. + /// public class PartiePartieTermineeEventArgsUT { + /// + /// Test du constructeur de l'evenement valide. + /// [Fact] public void TestConstructeurValide() { diff --git a/Sources/UnitTesting/PartiePasserLaMainEventArgsUT.cs b/Sources/UnitTesting/PartiePasserLaMainEventArgsUT.cs index dbca6d8..fca3a50 100644 --- a/Sources/UnitTesting/PartiePasserLaMainEventArgsUT.cs +++ b/Sources/UnitTesting/PartiePasserLaMainEventArgsUT.cs @@ -1,12 +1,16 @@ - - -using CoreLibrary.Evenements; +using CoreLibrary.Evenements; using Xunit; namespace UnitTesting { + /// + /// Classe de test de l'evenement PartiePasserLaMainEventArgs. + /// public class PartiePasserLaMainEventArgsUT { + /// + /// Test du constructeur de l'evenement PartiePasserLaMainEventArgs. + /// [Fact] public void TestConstructeurValide() { diff --git a/Sources/UnitTesting/PartieUT.cs b/Sources/UnitTesting/PartieUT.cs index 53dec98..4c20ef5 100644 --- a/Sources/UnitTesting/PartieUT.cs +++ b/Sources/UnitTesting/PartieUT.cs @@ -28,7 +28,7 @@ namespace UnitTesting } /// - /// Test le deuxième constructeur de Partie valide. + /// Test le deuxieme constructeur de Partie valide. /// [Fact] public void TestSecondConstructeurValide() @@ -117,7 +117,7 @@ namespace UnitTesting } /// - /// Test la méthode JouerDemanderJoueur de Partie. + /// Test la methode JouerDemanderJoueur de Partie. /// [Fact] public void TestJouerDemanderJouer() @@ -142,7 +142,7 @@ namespace UnitTesting } /// - /// Test la méthode JouerDebutPartie de Partie. + /// Test la methode JouerDebutPartie de Partie. /// [Fact] public void TestJouerDebutPartie() @@ -168,7 +168,7 @@ namespace UnitTesting } /// - /// Test la méthode DemanderJoueur de Partie. + /// Test la methode DemanderJoueur de Partie. /// [Fact] public void TestDemanderJoueur() @@ -197,7 +197,7 @@ namespace UnitTesting } /// - /// Test l'événement JoueurSeConnecterEventArgs de Partie. + /// Test l'evenement JoueurSeConnecterEventArgs de Partie. /// [Fact] public void TestJoueurConnecte() @@ -321,7 +321,7 @@ namespace UnitTesting } /// - /// Test la création d'un robot. + /// Test la creation d'un robot. /// [Fact] public void TestRobot() @@ -343,7 +343,7 @@ namespace UnitTesting } /// - /// Test la méthode DebutPartie de Partie. + /// Test la methode DebutPartie de Partie. /// [Fact] public void TestDebutPartie() @@ -396,7 +396,7 @@ namespace UnitTesting } /// - /// Test la méthode NouveauTour de Partie. + /// Test la methode NouveauTour de Partie. /// [Fact] public void TestNouveauTour() @@ -437,7 +437,7 @@ namespace UnitTesting } /// - /// Test la méthode AjouterCode de Partie et vérifie qu'il y a eu une incrémentation pour le nombre de tour. + /// Test la methode AjouterCode de Partie et verifie qu'il y a eu une incrementation pour le nombre de tour. /// [Fact] public void TestPlateauAjouterCodeIncrementation() @@ -492,7 +492,7 @@ namespace UnitTesting } /// - /// Test la méthode AjouterCode de Partie et vérifie que la partie est terminée. + /// Test la methode AjouterCode de Partie et verifie que la partie est terminee. /// [Fact] public void PlateauAjouterCodeTerminee() @@ -535,7 +535,7 @@ namespace UnitTesting } /// - /// Test la méthode PartieTerminee de Partie et vérifie les gagnants et perdants. + /// Test la methode PartieTerminee de Partie et verifie les gagnants et perdants. /// [Fact] public void TestPartieTerminee() @@ -581,7 +581,7 @@ namespace UnitTesting } /// - /// Test tous les événements de Partie. + /// Test tous les evenements de Partie. /// [Fact] public void TestPartieEcoute() @@ -653,7 +653,7 @@ namespace UnitTesting } /// - /// Test la méthode AjouterCode de Partie avec toutes ses composantes et les différentes fin. + /// Test la methode AjouterCode de Partie avec toutes ses composantes et les differentes fin. /// [Fact] public void TestPartiePlateauAjouterCode() diff --git a/Sources/UnitTesting/PlateauAjouterCodeEventArgsUT.cs b/Sources/UnitTesting/PlateauAjouterCodeEventArgsUT.cs index 7214741..47e0a05 100644 --- a/Sources/UnitTesting/PlateauAjouterCodeEventArgsUT.cs +++ b/Sources/UnitTesting/PlateauAjouterCodeEventArgsUT.cs @@ -4,8 +4,14 @@ using Xunit; namespace UnitTesting { + /// + /// Classe de test de l'evenement PlateauAjouterCodeEventArgs. + /// public class PlateauAjouterCodeEventArgsUT { + /// + /// Test du constructeur valide. + /// [Fact] public void TestConstructeurValide() { diff --git a/Sources/UnitTesting/PlateauUT.cs b/Sources/UnitTesting/PlateauUT.cs index 21c2c50..c5d4de7 100644 --- a/Sources/UnitTesting/PlateauUT.cs +++ b/Sources/UnitTesting/PlateauUT.cs @@ -32,7 +32,7 @@ namespace UnitTesting } /// - /// Test la méthode EstComplet de Plateau et vérifie qu'il renvoie True. + /// Test la methode EstComplet de Plateau et verifie qu'il renvoie True. /// [Fact] public void TestEstCompletTrue() @@ -54,7 +54,7 @@ namespace UnitTesting } /// - /// Test la méthode EstComplet de Plateau et vérifie qu'il renvoie False. + /// Test la methode EstComplet de Plateau et verifie qu'il renvoie False. /// [Fact] public void TestEstCompletFalse() @@ -75,7 +75,7 @@ namespace UnitTesting } /// - /// Test l'exception CodeCompletException de Plateau avec une taille de code supérieure à ce qui est défini. + /// Test l'exception CodeCompletException de Plateau avec une taille de code superieure a ce qui est defini. /// [Fact] public void TestAjouterCodeTailleIncorrecte() @@ -111,7 +111,7 @@ namespace UnitTesting } /// - /// Test la méthode AjouterCode de Plateau avec un bon code. + /// Test la methode AjouterCode de Plateau avec un bon code. /// [Fact] public void TestAjouterCodeBonCode() @@ -131,7 +131,7 @@ namespace UnitTesting } /// - /// Test la méthode AjouterCode de Plateau et vérifie la grille et ses composants. + /// Test la methode AjouterCode de Plateau et verifie la grille et ses composants. /// [Fact] public void TestGrilleAjouterCode() @@ -209,7 +209,7 @@ namespace UnitTesting } /// - /// Test l'événement QuandPlateauAjouterCode de Plateau. + /// Test l'evenement QuandPlateauAjouterCode de Plateau. /// [Fact] public void TestPlateauEcoute() @@ -231,7 +231,7 @@ namespace UnitTesting } /// - /// Test la méthode AjouterCode de Plateau et vérifie tous les cas d'arrêts. + /// Test la methode AjouterCode de Plateau et verifie tous les cas d'arrets. /// [Fact] public void TestAjouterCodeVictoire() diff --git a/Sources/UnitTesting/ReglesClassiquesUT.cs b/Sources/UnitTesting/ReglesClassiquesUT.cs index 2ddf292..00b2666 100644 --- a/Sources/UnitTesting/ReglesClassiquesUT.cs +++ b/Sources/UnitTesting/ReglesClassiquesUT.cs @@ -9,7 +9,7 @@ namespace UnitTesting public class ReglesClassiquesUT { /// - /// Test les attributs de ReglesClassiques et vérifie qu'ils soient égaux. + /// Test les attributs de ReglesClassiques et verifie qu'ils soient egaux. /// [Fact] public void Test() diff --git a/Sources/UnitTesting/ReglesDifficilesUT.cs b/Sources/UnitTesting/ReglesDifficilesUT.cs index 64cf2e3..3893ba9 100644 --- a/Sources/UnitTesting/ReglesDifficilesUT.cs +++ b/Sources/UnitTesting/ReglesDifficilesUT.cs @@ -9,7 +9,7 @@ namespace UnitTesting public class ReglesDifficilesUT { /// - /// Test les attributs de ReglesDifficiles et vérifie qu'ils soient égaux. + /// Test les attributs de ReglesDifficiles et verifie qu'ils soient egaux. /// [Fact] public void Test() diff --git a/Sources/UnitTesting/RobotUT.cs b/Sources/UnitTesting/RobotUT.cs index 7a8b303..0fd69a9 100644 --- a/Sources/UnitTesting/RobotUT.cs +++ b/Sources/UnitTesting/RobotUT.cs @@ -5,8 +5,14 @@ using Xunit; namespace UnitTesting { + /// + /// Classe de test pour la classe Robot. + /// public class RobotUT { + /// + /// Test la methode EstCodePossible de la classe Robot. + /// [Fact] public void TestEstCodePossible() { @@ -68,6 +74,9 @@ namespace UnitTesting Assert.False((bool)estPossibleObj3); } + /// + /// Test la methode SupprimerCodesImpossibles de la classe Robot. + /// [Fact] public void TestSupprimerCodesImpossibles() { diff --git a/Sources/UnitTesting/TailleCodeExceptionUT.cs b/Sources/UnitTesting/TailleCodeExceptionUT.cs index 7c1bfbe..49db1b8 100644 --- a/Sources/UnitTesting/TailleCodeExceptionUT.cs +++ b/Sources/UnitTesting/TailleCodeExceptionUT.cs @@ -5,14 +5,23 @@ using Xunit; namespace UnitTesting { + /// + /// Classe de test de l'exception TailleCodeException. + /// public class TailleCodeExceptionUT { + /// + /// Test l'exception par defaut. + /// [Fact] public void ExceptionDefaut() { Assert.ThrowsAsync(() => throw new TailleCodeException()); } + /// + /// Test les attributs de l'exception. + /// [Fact] public void ExceptionAttributs() { @@ -28,6 +37,9 @@ namespace UnitTesting } } + /// + /// Test le message de l'exception TailleCodeException. + /// [Fact] public void ExceptionMessage() { @@ -45,6 +57,9 @@ namespace UnitTesting } } + /// + /// Test l'exception TailleCodeException et ses messages. + /// [Fact] public void ExceptionMessageEtException() { @@ -67,6 +82,9 @@ namespace UnitTesting } } + /// + /// Test la serialisation de l'exception TailleCodeException. + /// [Fact] public void ExceptionSerialisation() { diff --git a/Sources/UnitTesting/TailleGrilleExceptionUT.cs b/Sources/UnitTesting/TailleGrilleExceptionUT.cs index 7d4bf33..83b77fa 100644 --- a/Sources/UnitTesting/TailleGrilleExceptionUT.cs +++ b/Sources/UnitTesting/TailleGrilleExceptionUT.cs @@ -5,14 +5,23 @@ using Xunit; namespace UnitTesting { + /// + /// Classe de test de l'exception TailleGrille. + /// public class TailleGrilleExceptionUT - { + { + /// + /// Test l'exception par defaut. + /// [Fact] public void ExceptionDefaut() { Assert.ThrowsAsync(() => throw new TailleGrilleException()); - } - + } + + /// + /// Test l'exception avec ces attributs. + /// [Fact] public void ExceptionAttributs() { @@ -26,8 +35,11 @@ namespace UnitTesting { Assert.Contains("0", e.Message); } - } - + } + + /// + /// Test l'affichage du message de l'exception TailleGrilleException. + /// [Fact] public void ExceptionMessage() { @@ -43,8 +55,11 @@ namespace UnitTesting { Assert.Equal(message, e.Message); } - } - + } + + /// + /// Test l'exception TailleGrilleException et ses messages. + /// [Fact] public void ExceptionMessageEtException() { @@ -65,8 +80,11 @@ namespace UnitTesting Assert.IsType(e.InnerException); Assert.Equal(message2, e.InnerException.Message); } - } - + } + + /// + /// Test la serialisation de l'exception TailleGrilleException. + /// [Fact] public void ExceptionSerialisation() {