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