Documentation des exceptions

master
Pauline PRADY 1 year ago
parent 286b8412e7
commit a3161bd3e4

@ -7,14 +7,23 @@ using Xunit;
namespace UnitTesting namespace UnitTesting
{ {
/// <summary>
/// Classe de test de l'exception CodeCompletException.
/// </summary>
public class CodeCompletExceptionUT public class CodeCompletExceptionUT
{ {
/// <summary>
/// Test de l'exception CodeCompletException par defaut.
/// </summary>
[Fact] [Fact]
public void ExceptionDefaut() public void ExceptionDefaut()
{ {
Assert.ThrowsAsync<CodeCompletException>(() => throw new CodeCompletException()); Assert.ThrowsAsync<CodeCompletException>(() => throw new CodeCompletException());
} }
/// <summary>
/// Test du message de l'exception CodeCompletException.
/// </summary>
[Fact] [Fact]
public void ExceptionMessage() public void ExceptionMessage()
{ {
@ -30,8 +39,11 @@ namespace UnitTesting
{ {
Assert.Equal(message, e.Message); Assert.Equal(message, e.Message);
} }
} }
/// <summary>
/// Test de l'exception CodeCompletException et de ses messages.
/// </summary>
[Fact] [Fact]
public void ExceptionMessageEtException() public void ExceptionMessageEtException()
{ {
@ -52,8 +64,11 @@ namespace UnitTesting
Assert.IsType<InvalidOperationException>(e.InnerException); Assert.IsType<InvalidOperationException>(e.InnerException);
Assert.Equal(message2, e.InnerException.Message); Assert.Equal(message2, e.InnerException.Message);
} }
} }
/// <summary>
/// Test de la serialisation de l'exception CodeCompletException.
/// </summary>
[Fact] [Fact]
public void ExceptionSerialisation() public void ExceptionSerialisation()
{ {

@ -5,14 +5,23 @@ using Xunit;
namespace UnitTesting namespace UnitTesting
{ {
/// <summary>
/// Classe de test de l'exception CodeIncompletException.
/// </summary>
public class CodeIncompletExceptionUT public class CodeIncompletExceptionUT
{ {
/// <summary>
/// Test de l'exception CodeIncompletException par defaut.
/// </summary>
[Fact] [Fact]
public void ExceptionDefaut() public void ExceptionDefaut()
{ {
Assert.ThrowsAsync<CodeIncompletException>(() => throw new CodeIncompletException()); Assert.ThrowsAsync<CodeIncompletException>(() => throw new CodeIncompletException());
} }
/// <summary>
/// Test du message de l'exception CodeIncompletException.
/// </summary>
[Fact] [Fact]
public void ExceptionMessage() public void ExceptionMessage()
{ {
@ -28,8 +37,11 @@ namespace UnitTesting
{ {
Assert.Equal(message, e.Message); Assert.Equal(message, e.Message);
} }
} }
/// <summary>
/// Test de l'exception CodeIncompletException et de ses messages.
/// </summary>
[Fact] [Fact]
public void ExceptionMessageEtException() public void ExceptionMessageEtException()
{ {
@ -50,8 +62,11 @@ namespace UnitTesting
Assert.IsType<InvalidOperationException>(e.InnerException); Assert.IsType<InvalidOperationException>(e.InnerException);
Assert.Equal(message2, e.InnerException.Message); Assert.Equal(message2, e.InnerException.Message);
} }
} }
/// <summary>
/// Test de la serialisation de l'exception CodeIncompletException.
/// </summary>
[Fact] [Fact]
public void ExceptionSerialisation() public void ExceptionSerialisation()
{ {

@ -5,14 +5,23 @@ using Xunit;
namespace UnitTesting namespace UnitTesting
{ {
/// <summary>
/// Classe de test de l'exception CodeInvalideException.
/// </summary>
public class CodeInvalideExceptionUT public class CodeInvalideExceptionUT
{ {
/// <summary>
/// Test de l'exception CodeInvalideException par defaut.
/// </summary>
[Fact] [Fact]
public void ExceptionDefaut() public void ExceptionDefaut()
{ {
Assert.ThrowsAsync<CodeInvalideException>(() => throw new CodeInvalideException()); Assert.ThrowsAsync<CodeInvalideException>(() => throw new CodeInvalideException());
} }
/// <summary>
/// Test des attributs de l'exception CodeInvalideException.
/// </summary>
[Fact] [Fact]
public void ExceptionAttributs() public void ExceptionAttributs()
{ {
@ -27,8 +36,11 @@ namespace UnitTesting
Assert.Contains("3", e.Message); Assert.Contains("3", e.Message);
Assert.Contains("4", e.Message); Assert.Contains("4", e.Message);
} }
} }
/// <summary>
/// Test du message de l'exception CodeInvalideException.
/// </summary>
[Fact] [Fact]
public void ExceptionMessage() public void ExceptionMessage()
{ {
@ -44,8 +56,11 @@ namespace UnitTesting
{ {
Assert.Equal(message, e.Message); Assert.Equal(message, e.Message);
} }
} }
/// <summary>
/// Test de l'exception CodeInvalideException et de ses messages.
/// </summary>
[Fact] [Fact]
public void ExceptionMessageEtException() public void ExceptionMessageEtException()
{ {
@ -66,8 +81,11 @@ namespace UnitTesting
Assert.IsType<InvalidOperationException>(e.InnerException); Assert.IsType<InvalidOperationException>(e.InnerException);
Assert.Equal(message2, e.InnerException.Message); Assert.Equal(message2, e.InnerException.Message);
} }
} }
/// <summary>
/// Test de la serialisation de l'exception CodeInvalideException.
/// </summary>
[Fact] [Fact]
public void ExceptionSerialisation() public void ExceptionSerialisation()
{ {

@ -4,15 +4,24 @@ using System.Runtime.Serialization;
using Xunit; using Xunit;
namespace UnitTesting namespace UnitTesting
{ {
/// <summary>
/// Classe de test de l'exception CodeVideException.
/// </summary>
public class CodeVideExceptionUT public class CodeVideExceptionUT
{ {
/// <summary>
/// Test de l'exception CodeVideException par defaut.
/// </summary>
[Fact] [Fact]
public void ExceptionDefaut() public void ExceptionDefaut()
{ {
Assert.ThrowsAsync<CodeVideException>(() => throw new CodeVideException()); Assert.ThrowsAsync<CodeVideException>(() => throw new CodeVideException());
} }
/// <summary>
/// Test du message de l'exception CodeVideException.
/// </summary>
[Fact] [Fact]
public void ExceptionMessage() public void ExceptionMessage()
{ {
@ -30,6 +39,9 @@ namespace UnitTesting
} }
} }
/// <summary>
/// Test de l'exception CodeVideException et de ses messages.
/// </summary>
[Fact] [Fact]
public void ExceptionMessageEtException() public void ExceptionMessageEtException()
{ {
@ -52,6 +64,9 @@ namespace UnitTesting
} }
} }
/// <summary>
/// Test de la serialisation de l'exception CodeVideException.
/// </summary>
[Fact] [Fact]
public void ExceptionSerialisation() public void ExceptionSerialisation()
{ {

@ -4,15 +4,24 @@ using System.Runtime.Serialization;
using Xunit; using Xunit;
namespace UnitTesting namespace UnitTesting
{ {
/// <summary>
/// Classe de test de l'exception GrilleCompleteException.
/// </summary>
public class GrilleCompleteExceptionUT public class GrilleCompleteExceptionUT
{ {
/// <summary>
/// Test de l'exception GrilleCompleteException par defaut.
/// </summary>
[Fact] [Fact]
public void ExceptionDefaut() public void ExceptionDefaut()
{ {
Assert.ThrowsAsync<GrilleCompleteException>(() => throw new GrilleCompleteException()); Assert.ThrowsAsync<GrilleCompleteException>(() => throw new GrilleCompleteException());
} }
/// <summary>
/// Test du message de l'exception GrilleCompleteException.
/// </summary>
[Fact] [Fact]
public void ExceptionMessage() public void ExceptionMessage()
{ {
@ -30,6 +39,9 @@ namespace UnitTesting
} }
} }
/// <summary>
/// Test de l'exception GrilleCompleteException et de ses messages.
/// </summary>
[Fact] [Fact]
public void ExceptionMessageEtException() public void ExceptionMessageEtException()
{ {
@ -52,6 +64,9 @@ namespace UnitTesting
} }
} }
/// <summary>
/// Test de la serialisation de l'evenement GrilleCompleteException.
/// </summary>
[Fact] [Fact]
public void ExceptionSerialisation() public void ExceptionSerialisation()
{ {

@ -4,15 +4,24 @@ using System.Runtime.Serialization;
using Xunit; using Xunit;
namespace UnitTesting namespace UnitTesting
{ {
/// <summary>
/// Classe de test de l'exception IndiceCodeException.
/// </summary>
public class IndiceCodeExceptionUT public class IndiceCodeExceptionUT
{ {
/// <summary>
/// Test de l'exception IndiceCodeException par defaut.
/// </summary>
[Fact] [Fact]
public void ExceptionDefaut() public void ExceptionDefaut()
{ {
Assert.ThrowsAsync<IndiceCodeException>(() => throw new IndiceCodeException()); Assert.ThrowsAsync<IndiceCodeException>(() => throw new IndiceCodeException());
} }
/// <summary>
/// Test des attributs de l'exception IndiceCodeException.
/// </summary>
[Fact] [Fact]
public void ExceptionAttributs() public void ExceptionAttributs()
{ {
@ -29,6 +38,9 @@ namespace UnitTesting
} }
} }
/// <summary>
/// Test du message de l'exception IndiceCodeException.
/// </summary>
[Fact] [Fact]
public void ExceptionMessage() public void ExceptionMessage()
{ {
@ -46,6 +58,9 @@ namespace UnitTesting
} }
} }
/// <summary>
/// Test de l'exception IndiceCodeException et de ses messages.
/// </summary>
[Fact] [Fact]
public void ExceptionMessageEtException() public void ExceptionMessageEtException()
{ {
@ -68,6 +83,9 @@ namespace UnitTesting
} }
} }
/// <summary>
/// Test de la serialisation de l'evenement IndiceCodeException.
/// </summary>
[Fact] [Fact]
public void ExceptionSerialisation() public void ExceptionSerialisation()
{ {

@ -4,15 +4,24 @@ using System.Runtime.Serialization;
using Xunit; using Xunit;
namespace UnitTesting namespace UnitTesting
{ {
/// <summary>
/// Classe de test de l'exception JoueurDejaPresentException.
/// </summary>
public class JoueurDejaPresentExceptionUT public class JoueurDejaPresentExceptionUT
{ {
/// <summary>
/// Test de l'exception JoueurDejaPresentException par defaut.
/// </summary>
[Fact] [Fact]
public void ExceptionDefaut() public void ExceptionDefaut()
{ {
Assert.ThrowsAsync<JoueurDejaPresentException>(() => throw new JoueurDejaPresentException()); Assert.ThrowsAsync<JoueurDejaPresentException>(() => throw new JoueurDejaPresentException());
} }
/// <summary>
/// Test du message de l'exception JoueurDejaPresentException.
/// </summary>
[Fact] [Fact]
public void ExceptionMessage() public void ExceptionMessage()
{ {
@ -30,6 +39,9 @@ namespace UnitTesting
} }
} }
/// <summary>
/// Test de l'exception JoueurDejaPresentException et ses messages.
/// </summary>
[Fact] [Fact]
public void ExceptionMessageEtException() public void ExceptionMessageEtException()
{ {
@ -52,6 +64,9 @@ namespace UnitTesting
} }
} }
/// <summary>
/// Test de la serilisation de l'exception JoueurDejaPresentException.
/// </summary>
[Fact] [Fact]
public void ExceptionSerialisation() public void ExceptionSerialisation()
{ {

@ -4,15 +4,24 @@ using System.Runtime.Serialization;
using Xunit; using Xunit;
namespace UnitTesting namespace UnitTesting
{ {
/// <summary>
/// Classe de test pour l'exception NomJoueurInterditException.
/// </summary>
public class NomJoueurInterditExceptionUT public class NomJoueurInterditExceptionUT
{ {
/// <summary>
/// Test de l'exception NomJoueurInterditException par defaut.
/// </summary>
[Fact] [Fact]
public void ExceptionDefaut() public void ExceptionDefaut()
{ {
Assert.ThrowsAsync<NomJoueurInterditException>(() => throw new NomJoueurInterditException()); Assert.ThrowsAsync<NomJoueurInterditException>(() => throw new NomJoueurInterditException());
} }
/// <summary>
/// Test du message de l'exception NomJoueurInterditException.
/// </summary>
[Fact] [Fact]
public void ExceptionMessage() public void ExceptionMessage()
{ {
@ -30,6 +39,9 @@ namespace UnitTesting
} }
} }
/// <summary>
/// Test de l'exception NomJoueurInterditException et de ses messages.
/// </summary>
[Fact] [Fact]
public void ExceptionMessageEtException() public void ExceptionMessageEtException()
{ {
@ -52,6 +64,9 @@ namespace UnitTesting
} }
} }
/// <summary>
/// Test de la serilisation de l'exception NomJoueurInterditException.
/// </summary>
[Fact] [Fact]
public void ExceptionSerialisation() public void ExceptionSerialisation()
{ {

@ -5,14 +5,23 @@ using Xunit;
namespace UnitTesting namespace UnitTesting
{ {
/// <summary>
/// Classe de test de l'exception TailleCodeException.
/// </summary>
public class TailleCodeExceptionUT public class TailleCodeExceptionUT
{ {
/// <summary>
/// Test l'exception par defaut.
/// </summary>
[Fact] [Fact]
public void ExceptionDefaut() public void ExceptionDefaut()
{ {
Assert.ThrowsAsync<TailleCodeException>(() => throw new TailleCodeException()); Assert.ThrowsAsync<TailleCodeException>(() => throw new TailleCodeException());
} }
/// <summary>
/// Test les attributs de l'exception.
/// </summary>
[Fact] [Fact]
public void ExceptionAttributs() public void ExceptionAttributs()
{ {
@ -28,6 +37,9 @@ namespace UnitTesting
} }
} }
/// <summary>
/// Test le message de l'exception TailleCodeException.
/// </summary>
[Fact] [Fact]
public void ExceptionMessage() public void ExceptionMessage()
{ {
@ -45,6 +57,9 @@ namespace UnitTesting
} }
} }
/// <summary>
/// Test l'exception TailleCodeException et ses messages.
/// </summary>
[Fact] [Fact]
public void ExceptionMessageEtException() public void ExceptionMessageEtException()
{ {
@ -67,6 +82,9 @@ namespace UnitTesting
} }
} }
/// <summary>
/// Test la serialisation de l'exception TailleCodeException.
/// </summary>
[Fact] [Fact]
public void ExceptionSerialisation() public void ExceptionSerialisation()
{ {

@ -5,14 +5,23 @@ using Xunit;
namespace UnitTesting namespace UnitTesting
{ {
/// <summary>
/// Classe de test de l'exception TailleGrille.
/// </summary>
public class TailleGrilleExceptionUT public class TailleGrilleExceptionUT
{ {
/// <summary>
/// Test l'exception par defaut.
/// </summary>
[Fact] [Fact]
public void ExceptionDefaut() public void ExceptionDefaut()
{ {
Assert.ThrowsAsync<TailleGrilleException>(() => throw new TailleGrilleException()); Assert.ThrowsAsync<TailleGrilleException>(() => throw new TailleGrilleException());
} }
/// <summary>
/// Test l'exception avec ces attributs.
/// </summary>
[Fact] [Fact]
public void ExceptionAttributs() public void ExceptionAttributs()
{ {
@ -26,8 +35,11 @@ namespace UnitTesting
{ {
Assert.Contains("0", e.Message); Assert.Contains("0", e.Message);
} }
} }
/// <summary>
/// Test l'affichage du message de l'exception TailleGrilleException.
/// </summary>
[Fact] [Fact]
public void ExceptionMessage() public void ExceptionMessage()
{ {
@ -43,8 +55,11 @@ namespace UnitTesting
{ {
Assert.Equal(message, e.Message); Assert.Equal(message, e.Message);
} }
} }
/// <summary>
/// Test l'exception TailleGrilleException et ses messages.
/// </summary>
[Fact] [Fact]
public void ExceptionMessageEtException() public void ExceptionMessageEtException()
{ {
@ -65,8 +80,11 @@ namespace UnitTesting
Assert.IsType<InvalidOperationException>(e.InnerException); Assert.IsType<InvalidOperationException>(e.InnerException);
Assert.Equal(message2, e.InnerException.Message); Assert.Equal(message2, e.InnerException.Message);
} }
} }
/// <summary>
/// Test la serialisation de l'exception TailleGrilleException.
/// </summary>
[Fact] [Fact]
public void ExceptionSerialisation() public void ExceptionSerialisation()
{ {

Loading…
Cancel
Save