diff --git a/NUnitTestProject1/NUnitTestProject1.csproj b/NUnitTestProject1/NUnitTestProject1.csproj
new file mode 100644
index 0000000..580d479
--- /dev/null
+++ b/NUnitTestProject1/NUnitTestProject1.csproj
@@ -0,0 +1,15 @@
+
+
+
+ netcoreapp3.0
+
+ false
+
+
+
+
+
+
+
+
+
diff --git a/NUnitTestProject1/UnitTest1.cs b/NUnitTestProject1/UnitTest1.cs
new file mode 100644
index 0000000..d2d4840
--- /dev/null
+++ b/NUnitTestProject1/UnitTest1.cs
@@ -0,0 +1,18 @@
+using NUnit.Framework;
+
+namespace NUnitTestProject1
+{
+ public class Tests
+ {
+ [SetUp]
+ public void Setup()
+ {
+ }
+
+ [Test]
+ public void Test1()
+ {
+ Assert.Pass();
+ }
+ }
+}
\ No newline at end of file
diff --git a/TestUnit/TestUnit.csproj b/TestUnit/TestUnit.csproj
new file mode 100644
index 0000000..36979d1
--- /dev/null
+++ b/TestUnit/TestUnit.csproj
@@ -0,0 +1,22 @@
+
+
+
+ netcoreapp3.0
+
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/TestUnit/UnitTest1.cs b/TestUnit/UnitTest1.cs
new file mode 100644
index 0000000..df59c19
--- /dev/null
+++ b/TestUnit/UnitTest1.cs
@@ -0,0 +1,11 @@
+namespace TestUnit
+{
+ [TestClass]
+ public class UnitTest1
+ {
+ [TestMethod]
+ public void TestMethod1()
+ {
+ }
+ }
+}
diff --git a/TestUnitaire/AppInitializer.cs b/TestUnitaire/AppInitializer.cs
index a787b93..0c00000 100644
--- a/TestUnitaire/AppInitializer.cs
+++ b/TestUnitaire/AppInitializer.cs
@@ -9,7 +9,7 @@ namespace TestUnitaire
{
public class AppInitializer
{
- public static IApp StartApp(Platform platform)
+ /*public static IApp StartApp(Platform platform)
{
// TODO: If the iOS or Android app being tested is included in the solution
// then open the Unit Tests window, right click Test Apps, select Add App Project
@@ -38,6 +38,6 @@ namespace TestUnitaire
// code if the app is not included in the solution.
//.AppBundle ("../../../iOS/bin/iPhoneSimulator/Debug/XamarinForms.iOS.app")
.StartApp();
- }
+ }*/
}
}
diff --git a/TheGameExtreme.Android/Resources/Resource.designer.cs b/TheGameExtreme.Android/Resources/Resource.designer.cs
index 38335a6..2254765 100644
--- a/TheGameExtreme.Android/Resources/Resource.designer.cs
+++ b/TheGameExtreme.Android/Resources/Resource.designer.cs
@@ -1,11 +1,11 @@
#pragma warning disable 1591
//------------------------------------------------------------------------------
//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.42000
+// Ce code a été généré par un outil.
+// Version du runtime :4.0.30319.42000
//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
+// Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si
+// le code est régénéré.
//
//------------------------------------------------------------------------------
diff --git a/TheGameExtreme.sln b/TheGameExtreme.sln
index e78b001..0701b18 100644
--- a/TheGameExtreme.sln
+++ b/TheGameExtreme.sln
@@ -10,7 +10,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TheGameExtreme", "TheGameEx
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestUnitaire", "TestUnitaire\TestUnitaire.csproj", "{DAB0A3A0-CD99-4819-A813-01F10D77BAB1}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProjectUnitaire", "ProjectUnitaire\ProjectUnitaire.csproj", "{FA55654F-097D-4E83-809E-A2C7E46563A4}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTestProjectGame", "UnitTestProjectGame\UnitTestProjectGame.csproj", "{4092C852-D253-42F7-A800-E618C99C349E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -70,18 +70,18 @@ Global
{DAB0A3A0-CD99-4819-A813-01F10D77BAB1}.Release|iPhone.Build.0 = Release|Any CPU
{DAB0A3A0-CD99-4819-A813-01F10D77BAB1}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{DAB0A3A0-CD99-4819-A813-01F10D77BAB1}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
- {FA55654F-097D-4E83-809E-A2C7E46563A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {FA55654F-097D-4E83-809E-A2C7E46563A4}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {FA55654F-097D-4E83-809E-A2C7E46563A4}.Debug|iPhone.ActiveCfg = Debug|Any CPU
- {FA55654F-097D-4E83-809E-A2C7E46563A4}.Debug|iPhone.Build.0 = Debug|Any CPU
- {FA55654F-097D-4E83-809E-A2C7E46563A4}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
- {FA55654F-097D-4E83-809E-A2C7E46563A4}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
- {FA55654F-097D-4E83-809E-A2C7E46563A4}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {FA55654F-097D-4E83-809E-A2C7E46563A4}.Release|Any CPU.Build.0 = Release|Any CPU
- {FA55654F-097D-4E83-809E-A2C7E46563A4}.Release|iPhone.ActiveCfg = Release|Any CPU
- {FA55654F-097D-4E83-809E-A2C7E46563A4}.Release|iPhone.Build.0 = Release|Any CPU
- {FA55654F-097D-4E83-809E-A2C7E46563A4}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
- {FA55654F-097D-4E83-809E-A2C7E46563A4}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
+ {4092C852-D253-42F7-A800-E618C99C349E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4092C852-D253-42F7-A800-E618C99C349E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4092C852-D253-42F7-A800-E618C99C349E}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+ {4092C852-D253-42F7-A800-E618C99C349E}.Debug|iPhone.Build.0 = Debug|Any CPU
+ {4092C852-D253-42F7-A800-E618C99C349E}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {4092C852-D253-42F7-A800-E618C99C349E}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {4092C852-D253-42F7-A800-E618C99C349E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4092C852-D253-42F7-A800-E618C99C349E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4092C852-D253-42F7-A800-E618C99C349E}.Release|iPhone.ActiveCfg = Release|Any CPU
+ {4092C852-D253-42F7-A800-E618C99C349E}.Release|iPhone.Build.0 = Release|Any CPU
+ {4092C852-D253-42F7-A800-E618C99C349E}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {4092C852-D253-42F7-A800-E618C99C349E}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/TheGameExtreme/model/manager/SoloGameManager.cs b/TheGameExtreme/model/manager/SoloGameManager.cs
index 2e9d9bc..baee35f 100644
--- a/TheGameExtreme/model/manager/SoloGameManager.cs
+++ b/TheGameExtreme/model/manager/SoloGameManager.cs
@@ -17,7 +17,6 @@ namespace TheGameExtreme.model.manager
public override void endTurn()
{
// Vérifie que l'utilisateur a bien joué deux cartes
-
pioche();
currentIndexPlayer += 1;
diff --git a/UnitTestProjectGame/Properties/AssemblyInfo.cs b/UnitTestProjectGame/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..1fab91b
--- /dev/null
+++ b/UnitTestProjectGame/Properties/AssemblyInfo.cs
@@ -0,0 +1,20 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+[assembly: AssemblyTitle("UnitTestProjectGame")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("UnitTestProjectGame")]
+[assembly: AssemblyCopyright("Copyright © 2019")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+[assembly: ComVisible(false)]
+
+[assembly: Guid("4092c852-d253-42f7-a800-e618c99c349e")]
+
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/UnitTestProjectGame/UnitTest1.cs b/UnitTestProjectGame/UnitTest1.cs
new file mode 100644
index 0000000..bdd984b
--- /dev/null
+++ b/UnitTestProjectGame/UnitTest1.cs
@@ -0,0 +1,71 @@
+using System;
+using System.Collections.Generic;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using TheGameExtreme.model;
+using TheGameExtreme.model.manager;
+using TheGameExtreme.viewmodel;
+
+namespace UnitTestProjectGame
+{
+ [TestClass]
+ public class UnitTest1
+ {
+ GameManager g1 = new SoloGameManager(2, new List { "clement", " baptiste" });
+ [TestMethod]
+ public void JoueTest()
+ {
+ object expectedRes = null;
+ int valueCard = 89;
+ int orderedStackSelected = 3;
+
+ g1.joue(valueCard, orderedStackSelected);
+ Assert.AreEqual(expectedRes, null);
+ }
+
+ [TestMethod]
+ public void isCanPlayTest()
+ {
+ List currentHhand = new List();
+ bool valeur;
+ bool expected1 = true;
+ bool expected2 = false;
+ g1.isCanPlay();
+
+
+ if(g1.isCanPlay() == true)
+ {
+ valeur = true;
+ Assert.AreEqual(expected1, valeur);
+ }
+ /*else
+ {
+ //Exception à gérer//
+ }*/
+
+ if(g1.isCanPlay() == false)
+ {
+ valeur = false;
+ Assert.Equals(expected2, valeur);
+ }
+ else
+ {
+ //Exception à gérer//
+ }
+ }
+
+ [TestMethod]
+ public void EndTurnTest()
+ {
+ object expectedRes = null;
+
+ g1.endTurn();
+ Assert.AreEqual(expectedRes, null);
+ }
+
+ [TestMethod]
+ public void getCurentIndexPlayerTest()
+ {
+
+ }
+ }
+}
diff --git a/UnitTestProjectGame/UnitTestProjectGame.csproj b/UnitTestProjectGame/UnitTestProjectGame.csproj
new file mode 100644
index 0000000..044fe6d
--- /dev/null
+++ b/UnitTestProjectGame/UnitTestProjectGame.csproj
@@ -0,0 +1,74 @@
+
+
+
+
+
+ Debug
+ AnyCPU
+ {4092C852-D253-42F7-A800-E618C99C349E}
+ Library
+ Properties
+ UnitTestProjectGame
+ UnitTestProjectGame
+ v4.7.2
+ 512
+ {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ 15.0
+ $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
+ $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages
+ False
+ UnitTest
+
+
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+ ..\packages\MSTest.TestFramework.1.3.2\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll
+
+
+ ..\packages\MSTest.TestFramework.1.3.2\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {8DE6C881-FF77-4CC4-B8C4-CDEDD9AB13B3}
+ TheGameExtreme
+
+
+
+
+
+
+ Ce projet fait référence à des packages NuGet qui sont manquants sur cet ordinateur. Utilisez l'option de restauration des packages NuGet pour les télécharger. Pour plus d'informations, consultez http://go.microsoft.com/fwlink/?LinkID=322105. Le fichier manquant est : {0}.
+
+
+
+
+
+
\ No newline at end of file
diff --git a/UnitTestProjectGame/packages.config b/UnitTestProjectGame/packages.config
new file mode 100644
index 0000000..2f7c5a1
--- /dev/null
+++ b/UnitTestProjectGame/packages.config
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/UnitTestProjectTheGame/UnitTest1.cs b/UnitTestProjectTheGame/UnitTest1.cs
new file mode 100644
index 0000000..0c3552b
--- /dev/null
+++ b/UnitTestProjectTheGame/UnitTest1.cs
@@ -0,0 +1,15 @@
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using TheGameExtreme.model.manager;
+
+namespace UnitTestProjectTheGame
+{
+ [TestClass]
+ public class UnitTest1
+ {
+ [TestMethod]
+ public void TestMethod1()
+ {
+ GameManager g1 = new SoloGameManager();
+ }
+ }
+}
diff --git a/UnitTestProjectTheGame/UnitTestProjectTheGame.csproj b/UnitTestProjectTheGame/UnitTestProjectTheGame.csproj
new file mode 100644
index 0000000..8ae4c5b
--- /dev/null
+++ b/UnitTestProjectTheGame/UnitTestProjectTheGame.csproj
@@ -0,0 +1,16 @@
+
+
+
+ netcoreapp3.0
+
+ false
+
+
+
+
+
+
+
+
+
+
diff --git a/UnitTestTheGame/Program.fs b/UnitTestTheGame/Program.fs
new file mode 100644
index 0000000..0695f84
--- /dev/null
+++ b/UnitTestTheGame/Program.fs
@@ -0,0 +1 @@
+module Program = let [] main _ = 0
diff --git a/UnitTestTheGame/Tests.fs b/UnitTestTheGame/Tests.fs
new file mode 100644
index 0000000..2627b17
--- /dev/null
+++ b/UnitTestTheGame/Tests.fs
@@ -0,0 +1,11 @@
+namespace UnitTestTheGame
+
+open System
+open Microsoft.VisualStudio.TestTools.UnitTesting
+
+[]
+type TestClass () =
+
+ []
+ member this.TestMethodPassing () =
+ Assert.IsTrue(true);
diff --git a/UnitTestTheGame/UnitTestTheGame.fsproj b/UnitTestTheGame/UnitTestTheGame.fsproj
new file mode 100644
index 0000000..de9c46d
--- /dev/null
+++ b/UnitTestTheGame/UnitTestTheGame.fsproj
@@ -0,0 +1,22 @@
+
+
+
+ netcoreapp3.0
+
+ false
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+