aboutsummaryrefslogtreecommitdiff
path: root/MundusTests/ServiceTests/GameEventLogControllerTests.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MundusTests/ServiceTests/GameEventLogControllerTests.cs')
-rw-r--r--MundusTests/ServiceTests/GameEventLogControllerTests.cs35
1 files changed, 35 insertions, 0 deletions
diff --git a/MundusTests/ServiceTests/GameEventLogControllerTests.cs b/MundusTests/ServiceTests/GameEventLogControllerTests.cs
new file mode 100644
index 0000000..bed1ef9
--- /dev/null
+++ b/MundusTests/ServiceTests/GameEventLogControllerTests.cs
@@ -0,0 +1,35 @@
+namespace MundusTests.ServiceTests
+{
+ using System.Linq;
+ using Mundus.Data;
+ using Mundus.Service;
+ using NUnit.Framework;
+
+ [TestFixture]
+ public static class GameEventLogControllerTests
+ {
+ [Test]
+ [TestCase("Testing")]
+ public static void AddsCorrectlyMessages(string message)
+ {
+ GameEventLogController.AddMessage(message);
+
+ Assert.AreEqual(message, DataBaseContexts.GELContext.GameEventLogs.Single(x => x.ID == DataBaseContexts.GELContext.GameEventLogs.Count()).Message);
+ }
+
+ [Test]
+ [TestCase("Testing1")]
+ public static void GetsCorrectlyMessage(string message)
+ {
+ GameEventLogController.AddMessage(message);
+
+ Assert.AreEqual(message, GameEventLogController.GetMessagage(GameEventLogController.GetCount() - 1));
+ }
+
+ [Test]
+ public static void GetsCorrectCount()
+ {
+ Assert.AreEqual(DataBaseContexts.GELContext.GetCount(), GameEventLogController.GetCount());
+ }
+ }
+}