diff options
| author | Syndamia <kamen.d.mladenov@protonmail.com> | 2020-05-22 12:59:32 +0300 |
|---|---|---|
| committer | Syndamia <kamen.d.mladenov@protonmail.com> | 2020-05-22 12:59:32 +0300 |
| commit | 747aa00440eb9b219d989a536b0ff0c959b35143 (patch) | |
| tree | f8b866f8e95c4597cae6b246746c23967e03def6 /MundusTests/ServiceTests/SuperLayers/ImageControllerTests.cs | |
| parent | a4e2f6753c6c2612444847fd12f1e973a86a4aa4 (diff) | |
| download | Mundus-747aa00440eb9b219d989a536b0ff0c959b35143.tar Mundus-747aa00440eb9b219d989a536b0ff0c959b35143.tar.gz Mundus-747aa00440eb9b219d989a536b0ff0c959b35143.zip | |
Completed all tests (there is still some code that can be tested, but it will be very hard to do so and I am skipping it for now).
Diffstat (limited to 'MundusTests/ServiceTests/SuperLayers/ImageControllerTests.cs')
| -rw-r--r-- | MundusTests/ServiceTests/SuperLayers/ImageControllerTests.cs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/MundusTests/ServiceTests/SuperLayers/ImageControllerTests.cs b/MundusTests/ServiceTests/SuperLayers/ImageControllerTests.cs index 9ab6418..248adbe 100644 --- a/MundusTests/ServiceTests/SuperLayers/ImageControllerTests.cs +++ b/MundusTests/ServiceTests/SuperLayers/ImageControllerTests.cs @@ -3,7 +3,6 @@ using Gtk; using Mundus.Data; using Mundus.Data.Tiles.Mobs; - using Mundus.Data.Windows; using Mundus.Service.SuperLayers; using NUnit.Framework; using static Mundus.Service.SuperLayers.ImageController; @@ -12,7 +11,6 @@ [TestFixture] public static class ImageControllerTests { - [Test] [TestCase(1, 5)] [TestCase(2, 2)] @@ -67,14 +65,17 @@ { Image img = null; - if (DataBaseContexts.LContext.GetStructureLayerStock(yPos, xPos) != null) { + if (DataBaseContexts.LContext.GetStructureLayerStock(yPos, xPos) != null) + { img = new Image(DataBaseContexts.LContext.GetStructureLayerStock(yPos, xPos), IconSize.Dnd); } - if (img == null) { + if (img == null) + { Assert.AreEqual(img, ImageController.GetPlayerScreenImage(yPos, xPos, Layer.Structure), $"Structure image at Y:{yPos}, X:{xPos} should be null"); } - else { + else + { Assert.AreEqual(img.Stock, ImageController.GetPlayerScreenImage(yPos, xPos, Layer.Structure).Stock, $"Structure image at Y:{yPos}, X:{xPos} should be {img.Stock}, but is {ImageController.GetPlayerScreenImage(yPos, xPos, Layer.Ground).Stock}"); } } @@ -115,7 +116,8 @@ [TestCase(0)] [TestCase(1)] [TestCase(2)] - public static void GetsCorrectPlayerAccessoriesImage(int index) { + public static void GetsCorrectPlayerAccessoriesImage(int index) + { Image img = new Image("blank_gear", IconSize.Dnd); if (MI.Player.Inventory.Accessories[index] != null) |
