diff --git a/Sources/BowlingLib/Class1.cs b/Sources/BowlingLib/Class1.cs
deleted file mode 100644
index 31eb072..0000000
--- a/Sources/BowlingLib/Class1.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-using System;
-
-namespace HelloWorldLib
-{
- ///
- ///a sample class
- ///
- public class Class1
- {
- }
-}
diff --git a/Sources/BowlingLib/Model/Joueur.cs b/Sources/BowlingLib/Model/Joueur.cs
index 879038f..5bfd53d 100644
--- a/Sources/BowlingLib/Model/Joueur.cs
+++ b/Sources/BowlingLib/Model/Joueur.cs
@@ -16,7 +16,7 @@ namespace BowlingLib.Model
if (pseudo == null || pseudo == "")
{
- throw new Exception("Le pseudo ne peut pas être vide");
+ throw new ArgumentException("Le pseudo ne peut pas être vide");
}
}
diff --git a/Sources/Tests/BowlingAppUnitTest/UnitTest1.cs b/Sources/Tests/BowlingAppUnitTest/UnitTest1.cs
deleted file mode 100644
index 69d7a2a..0000000
--- a/Sources/Tests/BowlingAppUnitTest/UnitTest1.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using System;
-using HelloWorldLib;
-using Xunit;
-
-namespace HelloWordLib_UnitTests
-{
- public class UnitTest1
- {
- [Fact]
- public void Test1()
- {
- Class1 c = new Class1();
- Assert.NotNull(c);
- }
- }
-}
diff --git a/Sources/Tests/BowlingAppUnitTest/UnitTestJoueur.cs b/Sources/Tests/BowlingAppUnitTest/UnitTestJoueur.cs
new file mode 100644
index 0000000..510031d
--- /dev/null
+++ b/Sources/Tests/BowlingAppUnitTest/UnitTestJoueur.cs
@@ -0,0 +1,24 @@
+using System;
+using BowlingLib.Model;
+using Xunit;
+
+namespace Test.BowlingAppUnitTest
+{
+ public class UnitTestJoueur
+ {
+ [Fact]
+ public void TestConstructeur()
+ {
+ Joueur j = new Joueur("Paul");
+ Assert.NotNull(j);
+ Assert.Equal(j.Pseudo, "Paul");
+ Assert.NotEqual(j.Pseudo, "joel");
+ }
+
+ [Fact]
+ public void TestInvalidJoueur()
+ {
+ Assert.Throws(() => new Joueur(null));
+ }
+ }
+}
diff --git a/Sources/global.json b/Sources/global.json
new file mode 100644
index 0000000..87aef9f
--- /dev/null
+++ b/Sources/global.json
@@ -0,0 +1,7 @@
+{
+ "sdk": {
+ "version": "6.0.0",
+ "rollForward": "latestMajor",
+ "allowPrerelease": false
+ }
+}
\ No newline at end of file