aboutsummaryrefslogtreecommitdiff
path: root/MundusTests/ServiceTests/SuperLayers/HeightControllerTests.cs
blob: 06124549a60d7431d10ddb4301b0e9dd9a1fb771 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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");
        }
    }
}