From d580ea82d48831e3cf243e5b250bf7076c8a6b1b Mon Sep 17 00:00:00 2001 From: Syndamia Date: Tue, 19 May 2020 13:29:09 +0300 Subject: Added final data test (that I didn't think I could do) --- .../SuperLayers/HeightControllerTests.cs | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 MundusTests/ServiceTests/SuperLayers/HeightControllerTests.cs (limited to 'MundusTests/ServiceTests') 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"); + } + } +} -- cgit v1.2.3