aboutsummaryrefslogtreecommitdiff
path: root/MundusTests/ServiceTests
diff options
context:
space:
mode:
Diffstat (limited to 'MundusTests/ServiceTests')
-rw-r--r--MundusTests/ServiceTests/SuperLayers/HeightControllerTests.cs30
1 files changed, 30 insertions, 0 deletions
diff --git a/MundusTests/ServiceTests/SuperLayers/HeightControllerTests.cs b/MundusTests/ServiceTests/SuperLayers/HeightControllerTests.cs
new file mode 100644
index 0000000..0612454
--- /dev/null
+++ b/MundusTests/ServiceTests/SuperLayers/HeightControllerTests.cs
@@ -0,0 +1,30 @@
+namespace MundusTests.ServiceTests.SuperLayers
+{
+ using Mundus.Data;
+ using Mundus.Service.SuperLayers;
+ using NUnit.Framework;
+
+ [TestFixture]
+ public static class HeightControllerTests
+ {
+ [Test]
+ public static void GetsCorrectSuperLayerUnderneath()
+ {
+ DataBaseContexts.CreateInstances();
+
+ Assert.AreEqual(DataBaseContexts.LContext, HeightController.GetSuperLayerUnderneath(DataBaseContexts.SContext), "GetSuperLayerUnderneath doesn't return that land is below sky");
+ Assert.AreEqual(DataBaseContexts.UContext, HeightController.GetSuperLayerUnderneath(DataBaseContexts.LContext), "GetSuperLayerUnderneath doesn't return that underground is below land");
+ Assert.AreEqual(null, HeightController.GetSuperLayerUnderneath(DataBaseContexts.UContext), "GetSuperLayerUnderneath doesn't return that there is nothing (null) below underground");
+ }
+
+ [Test]
+ public static void GetsCorrectSuperLayerAbove()
+ {
+ DataBaseContexts.CreateInstances();
+
+ Assert.AreEqual(null, HeightController.GetSuperLayerAbove(DataBaseContexts.SContext), "GetSuperLayerUnderneath doesn't return that there is nothing (null) above sky");
+ Assert.AreEqual(DataBaseContexts.SContext, HeightController.GetSuperLayerAbove(DataBaseContexts.LContext), "GetSuperLayerUnderneath doesn't return that sky is above land");
+ Assert.AreEqual(DataBaseContexts.LContext, HeightController.GetSuperLayerAbove(DataBaseContexts.UContext), "GetSuperLayerUnderneath doesn't return that land is above underground");
+ }
+ }
+}