aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSyndamia <kamen.d.mladenov@protonmail.com>2020-05-19 12:28:54 +0300
committerSyndamia <kamen.d.mladenov@protonmail.com>2020-05-19 12:28:54 +0300
commit65c474e881e880a71710aaf560f9afddecdb3e38 (patch)
tree23623407a5dc243b1828e7e41a4261c9d9283d37
parent02ec6e54e1d0ec36043aa1abe0cb372b47b2a7a6 (diff)
downloadMundus-65c474e881e880a71710aaf560f9afddecdb3e38.tar
Mundus-65c474e881e880a71710aaf560f9afddecdb3e38.tar.gz
Mundus-65c474e881e880a71710aaf560f9afddecdb3e38.zip
Finished with all Data layer tests
-rw-r--r--Mundus/Views/Windows/NewGameWindow.cs26
-rw-r--r--Mundus/gtk-gui/Mundus.Views.Windows.NewGameWindow.cs4
-rw-r--r--MundusTests/DataTests/Crafting/CraftingTableContextTests.cs20
-rw-r--r--MundusTests/DataTests/DataBaseContextsTests.cs20
-rw-r--r--MundusTests/DataTests/GameEventLogs/GameEventLogContextTests.cs24
-rw-r--r--MundusTests/DataTests/GameEventLogs/GameEventLogTests.cs14
-rw-r--r--MundusTests/DataTests/SuperLayers/DBTables/LGPlacedTileTests.cs21
-rw-r--r--MundusTests/DataTests/SuperLayers/DBTables/LMPlacedTileTests.cs22
-rw-r--r--MundusTests/DataTests/SuperLayers/DBTables/LSPlacedTile.cs22
-rw-r--r--MundusTests/DataTests/SuperLayers/DBTables/SGPlacedTileTests.cs21
-rw-r--r--MundusTests/DataTests/SuperLayers/DBTables/SMPlacedTileTests.cs22
-rw-r--r--MundusTests/DataTests/SuperLayers/DBTables/SSPlacedTileTests.cs22
-rw-r--r--MundusTests/DataTests/SuperLayers/DBTables/UGPlacedTileTests.cs21
-rw-r--r--MundusTests/DataTests/SuperLayers/DBTables/UMPlacedTileTests.cs22
-rw-r--r--MundusTests/DataTests/SuperLayers/DBTables/USPlacedTileTests.cs22
-rw-r--r--MundusTests/DataTests/SuperLayers/LandContextTests.cs39
-rw-r--r--MundusTests/DataTests/SuperLayers/SkyContextTests.cs39
-rw-r--r--MundusTests/DataTests/SuperLayers/UndergroundContextTests.cs39
-rw-r--r--MundusTests/MundusTests.csproj11
19 files changed, 343 insertions, 88 deletions
diff --git a/Mundus/Views/Windows/NewGameWindow.cs b/Mundus/Views/Windows/NewGameWindow.cs
index 98c52e9..ed4acfb 100644
--- a/Mundus/Views/Windows/NewGameWindow.cs
+++ b/Mundus/Views/Windows/NewGameWindow.cs
@@ -26,6 +26,19 @@
}
/// <summary>
+ /// Hides this screen, generates map and initializes the game window
+ /// </summary>
+ public void OnBtnGenerateClicked(object sender, EventArgs e)
+ {
+ // TODO: save settings somewhere
+
+ this.Hide();
+ this.ScreenInventorySetup();
+ this.GenerateMap();
+ GameGenerator.GameWindowInitialize();
+ }
+
+ /// <summary>
/// Every time the window is closed, this gets called (hides the window)
/// </summary>
protected void OnDeleteEvent(object sender, DeleteEventArgs a)
@@ -126,19 +139,6 @@
}
/// <summary>
- /// Hides this screen, generates map and initializes the game window
- /// </summary>
- private void OnBtnGenerateClicked(object sender, EventArgs e)
- {
- // TODO: save settings somewhere
-
- this.Hide();
- this.ScreenInventorySetup();
- this.GenerateMap();
- GameGenerator.GameWindowInitialize();
- }
-
- /// <summary>
/// Calls GameGenerator to generate the map depending on the selected map size button
/// </summary>
private void GenerateMap()
diff --git a/Mundus/gtk-gui/Mundus.Views.Windows.NewGameWindow.cs b/Mundus/gtk-gui/Mundus.Views.Windows.NewGameWindow.cs
index 2ea610e..0bbc355 100644
--- a/Mundus/gtk-gui/Mundus.Views.Windows.NewGameWindow.cs
+++ b/Mundus/gtk-gui/Mundus.Views.Windows.NewGameWindow.cs
@@ -247,7 +247,6 @@ namespace Mundus.Views.Windows
this.rbCreative.Sensitive = false;
this.rbCreative.CanFocus = true;
this.rbCreative.Name = "rbCreative";
- this.rbCreative.Active = true;
this.rbCreative.DrawIndicator = true;
this.rbCreative.UseUnderline = true;
this.rbCreative.Group = new global::GLib.SList(global::System.IntPtr.Zero);
@@ -264,7 +263,6 @@ namespace Mundus.Views.Windows
this.rbEasy.WidthRequest = 90;
this.rbEasy.CanFocus = true;
this.rbEasy.Name = "rbEasy";
- this.rbEasy.Active = true;
this.rbEasy.DrawIndicator = true;
this.rbEasy.UseUnderline = true;
this.rbEasy.Group = new global::GLib.SList(global::System.IntPtr.Zero);
@@ -313,7 +311,6 @@ namespace Mundus.Views.Windows
this.rbLarge.WidthRequest = 90;
this.rbLarge.CanFocus = true;
this.rbLarge.Name = "rbLarge";
- this.rbLarge.Active = true;
this.rbLarge.DrawIndicator = true;
this.rbLarge.UseUnderline = true;
this.rbLarge.Group = new global::GLib.SList(global::System.IntPtr.Zero);
@@ -345,7 +342,6 @@ namespace Mundus.Views.Windows
this.rbMLarge = new global::Gtk.RadioButton("Large");
this.rbMLarge.CanFocus = true;
this.rbMLarge.Name = "rbMLarge";
- this.rbMLarge.Active = true;
this.rbMLarge.DrawIndicator = true;
this.rbMLarge.UseUnderline = true;
this.rbMLarge.Group = new global::GLib.SList(global::System.IntPtr.Zero);
diff --git a/MundusTests/DataTests/Crafting/CraftingTableContextTests.cs b/MundusTests/DataTests/Crafting/CraftingTableContextTests.cs
index 224e250..9af68d5 100644
--- a/MundusTests/DataTests/Crafting/CraftingTableContextTests.cs
+++ b/MundusTests/DataTests/Crafting/CraftingTableContextTests.cs
@@ -1,17 +1,15 @@
-using System;
-using System.Linq;
-using Mundus.Data.Crafting;
-using Mundus.Data.Superlayers.Mobs;
-using Mundus.Data.Windows;
-using Mundus.Service;
-using Mundus.Service.Tiles.Mobs.LandMobs;
-using NUnit.Framework;
+namespace MundusTests.DataTests.Crafting
+{
+ using System.Linq;
+ using Mundus.Data.Crafting;
+ using NUnit.Framework;
-namespace MundusTests.DataTests.Crafting {
[TestFixture]
- public static class CraftingTableContextTests {
+ public static class CraftingTableContextTests
+ {
[Test]
- public static void AddsRecipesUponInitialization() {
+ public static void AddsRecipesUponInitialization()
+ {
CraftingTableContext craftingTC = new CraftingTableContext();
Assert.Less(0, craftingTC.CraftingRecipes.Count(), "CraftingTableContext doesn't add any recipes upon initialization");
diff --git a/MundusTests/DataTests/DataBaseContextsTests.cs b/MundusTests/DataTests/DataBaseContextsTests.cs
new file mode 100644
index 0000000..e5fcbd1
--- /dev/null
+++ b/MundusTests/DataTests/DataBaseContextsTests.cs
@@ -0,0 +1,20 @@
+using System;
+using Mundus.Data;
+using NUnit.Framework;
+
+namespace MundusTests.DataTests {
+ [TestFixture]
+ public static class DataBaseContextsTests {
+ [Test]
+ public static void CreatesInstances() {
+ DataBaseContexts.CreateInstances();
+
+ Assert.AreNotEqual(null, DataBaseContexts.SContext, "Doesn't create SContext instance");
+ Assert.AreNotEqual(null, DataBaseContexts.LContext, "Doesn't create LContext instance");
+ Assert.AreNotEqual(null, DataBaseContexts.UContext, "Doesn't create UContext instance");
+ Assert.AreNotEqual(null, DataBaseContexts.CTContext, "Doesn't create CTContext instance");
+ Assert.AreNotEqual(null, DataBaseContexts.GELContext, "Doesn't create GELContext instance");
+ Assert.AreNotEqual(null, DataBaseContexts.SuperLayerContexts, "Doesn't create SuperLayerContexts instance");
+ }
+ }
+}
diff --git a/MundusTests/DataTests/GameEventLogs/GameEventLogContextTests.cs b/MundusTests/DataTests/GameEventLogs/GameEventLogContextTests.cs
index c801c7d..b79c198 100644
--- a/MundusTests/DataTests/GameEventLogs/GameEventLogContextTests.cs
+++ b/MundusTests/DataTests/GameEventLogs/GameEventLogContextTests.cs
@@ -1,12 +1,15 @@
-using System.Linq;
-using Mundus.Data.GameEventLogs;
-using NUnit.Framework;
+namespace MundusTests.DataTests.GameEventLogs
+{
+ using System.Linq;
+ using Mundus.Data.GameEventLogs;
+ using NUnit.Framework;
-namespace MundusTests.DataTests.GameEventLogs {
[TestFixture]
- public static class GameEventLogContextTests {
+ public static class GameEventLogContextTests
+ {
[Test]
- public static void TableGetsResetOnInitialization() {
+ public static void TableGetsResetOnInitialization()
+ {
GameEventLogContext gelc = new GameEventLogContext();
Assert.AreEqual(0, gelc.GameEventLogs.Count(), "GameEventLogContext doesn't remove all values from table after being initialized.");
@@ -14,7 +17,8 @@ namespace MundusTests.DataTests.GameEventLogs {
[Test]
[TestCase("Test message one.", "Test message two.")]
- public static void AddsMessageToTable(string message1, string message2) {
+ public static void AddsMessageToTable(string message1, string message2)
+ {
GameEventLogContext gelc = new GameEventLogContext();
gelc.AddMessage(message1);
@@ -26,7 +30,8 @@ namespace MundusTests.DataTests.GameEventLogs {
[Test]
[TestCase("Test message 1.", "Test message 2.")]
- public static void AddsMessagesToTable(string message1, string message2) {
+ public static void AddsMessagesToTable(string message1, string message2)
+ {
GameEventLogContext gelc = new GameEventLogContext();
gelc.AddMessage(message1);
@@ -38,7 +43,8 @@ namespace MundusTests.DataTests.GameEventLogs {
[Test]
[TestCase("Test message 1.", "Test message 2.")]
- public static void CountsProperAmmountOfMessages(string message1, string message2) {
+ public static void CountsProperAmmountOfMessages(string message1, string message2)
+ {
GameEventLogContext gelc = new GameEventLogContext();
gelc.AddMessage(message1);
diff --git a/MundusTests/DataTests/GameEventLogs/GameEventLogTests.cs b/MundusTests/DataTests/GameEventLogs/GameEventLogTests.cs
index b6d75cd..8c39b8c 100644
--- a/MundusTests/DataTests/GameEventLogs/GameEventLogTests.cs
+++ b/MundusTests/DataTests/GameEventLogs/GameEventLogTests.cs
@@ -1,13 +1,15 @@
-using System;
-using Mundus.Data.GameEventLogs;
-using NUnit.Framework;
+namespace MundusTests.DataTests.GameEventLogs
+{
+ using Mundus.Data.GameEventLogs;
+ using NUnit.Framework;
-namespace MundusTests.DataTests.GameEventLogs {
[TestFixture]
- public static class GameEventLogTests {
+ public static class GameEventLogTests
+ {
[Test]
[TestCase("Testing message")]
- public static void InitializesWithProperMessageValue(string message) {
+ public static void InitializesWithProperMessageValue(string message)
+ {
GameEventLog log = new GameEventLog(message);
Assert.AreEqual(message, log.Message, "GameEventLog doesn't properly set message on initialization");
diff --git a/MundusTests/DataTests/SuperLayers/DBTables/LGPlacedTileTests.cs b/MundusTests/DataTests/SuperLayers/DBTables/LGPlacedTileTests.cs
new file mode 100644
index 0000000..999b8c9
--- /dev/null
+++ b/MundusTests/DataTests/SuperLayers/DBTables/LGPlacedTileTests.cs
@@ -0,0 +1,21 @@
+namespace MundusTests.DataTests.SuperLayers.DBTables
+{
+ using Mundus.Data.SuperLayers.DBTables;
+ using NUnit.Framework;
+
+ [TestFixture]
+ public static class LGPlacedTileTests
+ {
+ [Test]
+ [TestCase(null, 0, 0)]
+ [TestCase("test", 50, 23)]
+ public static void ConstructorWorksProperly(string stock_id, int yPos, int xPos)
+ {
+ LGPlacedTile pt = new LGPlacedTile(stock_id, yPos, xPos);
+
+ Assert.AreEqual(stock_id, pt.stock_id, "stock_id isn't set properly");
+ Assert.AreEqual(yPos, pt.YPos, "YPos isn't set properly");
+ Assert.AreEqual(xPos, pt.XPos, "XPos isn't set properly");
+ }
+ }
+}
diff --git a/MundusTests/DataTests/SuperLayers/DBTables/LMPlacedTileTests.cs b/MundusTests/DataTests/SuperLayers/DBTables/LMPlacedTileTests.cs
new file mode 100644
index 0000000..af6816a
--- /dev/null
+++ b/MundusTests/DataTests/SuperLayers/DBTables/LMPlacedTileTests.cs
@@ -0,0 +1,22 @@
+namespace MundusTests.DataTests.SuperLayers.DBTables
+{
+ using Mundus.Data.SuperLayers.DBTables;
+ using NUnit.Framework;
+
+ [TestFixture]
+ public static class LMPlacedTileTests
+ {
+ [Test]
+ [TestCase(null, -1, 0, 0)]
+ [TestCase("test", 10, 50, 23)]
+ public static void ConstructorWorksProperly(string stock_id, int health, int yPos, int xPos)
+ {
+ LMPlacedTile pt = new LMPlacedTile(stock_id, health, yPos, xPos);
+
+ Assert.AreEqual(stock_id, pt.stock_id, "stock_id isn't set properly");
+ Assert.AreEqual(yPos, pt.YPos, "YPos isn't set properly");
+ Assert.AreEqual(xPos, pt.XPos, "XPos isn't set properly");
+ Assert.AreEqual(health, pt.Health, "Health isn't set properly");
+ }
+ }
+}
diff --git a/MundusTests/DataTests/SuperLayers/DBTables/LSPlacedTile.cs b/MundusTests/DataTests/SuperLayers/DBTables/LSPlacedTile.cs
new file mode 100644
index 0000000..de20bf9
--- /dev/null
+++ b/MundusTests/DataTests/SuperLayers/DBTables/LSPlacedTile.cs
@@ -0,0 +1,22 @@
+namespace MundusTests.DataTests.SuperLayers.DBTables
+{
+ using Mundus.Data.SuperLayers.DBTables;
+ using NUnit.Framework;
+
+ [TestFixture]
+ public static class LSPlacedTileTests
+ {
+ [Test]
+ [TestCase(null, -1, 0, 0)]
+ [TestCase("test", 10, 50, 23)]
+ public static void ConstructorWorksProperly(string stock_id, int health, int yPos, int xPos)
+ {
+ LSPlacedTile pt = new LSPlacedTile(stock_id, health, yPos, xPos);
+
+ Assert.AreEqual(stock_id, pt.stock_id, "stock_id isn't set properly");
+ Assert.AreEqual(yPos, pt.YPos, "YPos isn't set properly");
+ Assert.AreEqual(xPos, pt.XPos, "XPos isn't set properly");
+ Assert.AreEqual(health, pt.Health, "Health isn't set properly");
+ }
+ }
+}
diff --git a/MundusTests/DataTests/SuperLayers/DBTables/SGPlacedTileTests.cs b/MundusTests/DataTests/SuperLayers/DBTables/SGPlacedTileTests.cs
new file mode 100644
index 0000000..e8214ed
--- /dev/null
+++ b/MundusTests/DataTests/SuperLayers/DBTables/SGPlacedTileTests.cs
@@ -0,0 +1,21 @@
+namespace MundusTests.DataTests.SuperLayers.DBTables
+{
+ using Mundus.Data.SuperLayers.DBTables;
+ using NUnit.Framework;
+
+ [TestFixture]
+ public static class SGPlacedTileTests
+ {
+ [Test]
+ [TestCase(null, 0, 0)]
+ [TestCase("test", 50, 23)]
+ public static void ConstructorWorksProperly(string stock_id, int yPos, int xPos)
+ {
+ SGPlacedTile pt = new SGPlacedTile(stock_id, yPos, xPos);
+
+ Assert.AreEqual(stock_id, pt.stock_id, "stock_id isn't set properly");
+ Assert.AreEqual(yPos, pt.YPos, "YPos isn't set properly");
+ Assert.AreEqual(xPos, pt.XPos, "XPos isn't set properly");
+ }
+ }
+}
diff --git a/MundusTests/DataTests/SuperLayers/DBTables/SMPlacedTileTests.cs b/MundusTests/DataTests/SuperLayers/DBTables/SMPlacedTileTests.cs
new file mode 100644
index 0000000..255b348
--- /dev/null
+++ b/MundusTests/DataTests/SuperLayers/DBTables/SMPlacedTileTests.cs
@@ -0,0 +1,22 @@
+namespace MundusTests.DataTests.SuperLayers.DBTables
+{
+ using Mundus.Data.SuperLayers.DBTables;
+ using NUnit.Framework;
+
+ [TestFixture]
+ public static class SMPlacedTileTests
+ {
+ [Test]
+ [TestCase(null, -1, 0, 0)]
+ [TestCase("test", 10, 50, 23)]
+ public static void ConstructorWorksProperly(string stock_id, int health, int yPos, int xPos)
+ {
+ SMPlacedTile pt = new SMPlacedTile(stock_id, health, yPos, xPos);
+
+ Assert.AreEqual(stock_id, pt.stock_id, "stock_id isn't set properly");
+ Assert.AreEqual(yPos, pt.YPos, "YPos isn't set properly");
+ Assert.AreEqual(xPos, pt.XPos, "XPos isn't set properly");
+ Assert.AreEqual(health, pt.Health, "XPos isn't set properly");
+ }
+ }
+}
diff --git a/MundusTests/DataTests/SuperLayers/DBTables/SSPlacedTileTests.cs b/MundusTests/DataTests/SuperLayers/DBTables/SSPlacedTileTests.cs
new file mode 100644
index 0000000..b83978a
--- /dev/null
+++ b/MundusTests/DataTests/SuperLayers/DBTables/SSPlacedTileTests.cs
@@ -0,0 +1,22 @@
+namespace MundusTests.DataTests.SuperLayers.DBTables
+{
+ using Mundus.Data.SuperLayers.DBTables;
+ using NUnit.Framework;
+
+ [TestFixture]
+ public static class SSPlacedTileTests
+ {
+ [Test]
+ [TestCase(null, -1, 0, 0)]
+ [TestCase("test", 10, 50, 23)]
+ public static void ConstructorWorksProperly(string stock_id, int health, int yPos, int xPos)
+ {
+ SSPlacedTile pt = new SSPlacedTile(stock_id, health, yPos, xPos);
+
+ Assert.AreEqual(stock_id, pt.stock_id, "stock_id isn't set properly");
+ Assert.AreEqual(yPos, pt.YPos, "YPos isn't set properly");
+ Assert.AreEqual(xPos, pt.XPos, "XPos isn't set properly");
+ Assert.AreEqual(health, pt.Health, "XPos isn't set properly");
+ }
+ }
+}
diff --git a/MundusTests/DataTests/SuperLayers/DBTables/UGPlacedTileTests.cs b/MundusTests/DataTests/SuperLayers/DBTables/UGPlacedTileTests.cs
new file mode 100644
index 0000000..45973f3
--- /dev/null
+++ b/MundusTests/DataTests/SuperLayers/DBTables/UGPlacedTileTests.cs
@@ -0,0 +1,21 @@
+namespace MundusTests.DataTests.SuperLayers.DBTables
+{
+ using Mundus.Data.SuperLayers.DBTables;
+ using NUnit.Framework;
+
+ [TestFixture]
+ public static class UGPlacedTileTests
+ {
+ [Test]
+ [TestCase(null, 0, 0)]
+ [TestCase("test", 50, 23)]
+ public static void ConstructorWorksProperly(string stock_id, int yPos, int xPos)
+ {
+ UGPlacedTile pt = new UGPlacedTile(stock_id, yPos, xPos);
+
+ Assert.AreEqual(stock_id, pt.stock_id, "stock_id isn't set properly");
+ Assert.AreEqual(yPos, pt.YPos, "YPos isn't set properly");
+ Assert.AreEqual(xPos, pt.XPos, "XPos isn't set properly");
+ }
+ }
+}
diff --git a/MundusTests/DataTests/SuperLayers/DBTables/UMPlacedTileTests.cs b/MundusTests/DataTests/SuperLayers/DBTables/UMPlacedTileTests.cs
new file mode 100644
index 0000000..3b5e99e
--- /dev/null
+++ b/MundusTests/DataTests/SuperLayers/DBTables/UMPlacedTileTests.cs
@@ -0,0 +1,22 @@
+namespace MundusTests.DataTests.SuperLayers.DBTables
+{
+ using Mundus.Data.SuperLayers.DBTables;
+ using NUnit.Framework;
+
+ [TestFixture]
+ public static class UMPlacedTileTests
+ {
+ [Test]
+ [TestCase(null, -1, 0, 0)]
+ [TestCase("test", 10, 50, 23)]
+ public static void ConstructorWorksProperly(string stock_id, int health, int yPos, int xPos)
+ {
+ UMPlacedTile pt = new UMPlacedTile(stock_id, health, yPos, xPos);
+
+ Assert.AreEqual(stock_id, pt.stock_id, "stock_id isn't set properly");
+ Assert.AreEqual(yPos, pt.YPos, "YPos isn't set properly");
+ Assert.AreEqual(xPos, pt.XPos, "XPos isn't set properly");
+ Assert.AreEqual(health, pt.Health, "XPos isn't set properly");
+ }
+ }
+}
diff --git a/MundusTests/DataTests/SuperLayers/DBTables/USPlacedTileTests.cs b/MundusTests/DataTests/SuperLayers/DBTables/USPlacedTileTests.cs
new file mode 100644
index 0000000..6da6868
--- /dev/null
+++ b/MundusTests/DataTests/SuperLayers/DBTables/USPlacedTileTests.cs
@@ -0,0 +1,22 @@
+namespace MundusTests.DataTests.SuperLayers.DBTables
+{
+ using Mundus.Data.SuperLayers.DBTables;
+ using NUnit.Framework;
+
+ [TestFixture]
+ public static class USPlacedTileTests
+ {
+ [Test]
+ [TestCase(null, -1, 0, 0)]
+ [TestCase("test", 10, 50, 23)]
+ public static void ConstructorWorksProperly(string stock_id, int health, int yPos, int xPos)
+ {
+ USPlacedTile pt = new USPlacedTile(stock_id, health, yPos, xPos);
+
+ Assert.AreEqual(stock_id, pt.stock_id, "stock_id isn't set properly");
+ Assert.AreEqual(yPos, pt.YPos, "YPos isn't set properly");
+ Assert.AreEqual(xPos, pt.XPos, "XPos isn't set properly");
+ Assert.AreEqual(health, pt.Health, "XPos isn't set properly");
+ }
+ }
+}
diff --git a/MundusTests/DataTests/SuperLayers/LandContextTests.cs b/MundusTests/DataTests/SuperLayers/LandContextTests.cs
index f083841..2329de8 100644
--- a/MundusTests/DataTests/SuperLayers/LandContextTests.cs
+++ b/MundusTests/DataTests/SuperLayers/LandContextTests.cs
@@ -1,14 +1,16 @@
-using System;
-using System.Linq;
-using Mundus.Data.SuperLayers;
-using Mundus.Data.SuperLayers.DBTables;
-using NUnit.Framework;
+namespace MundusTests.DataTests.SuperLayers
+{
+ using System.Linq;
+ using Mundus.Data.SuperLayers;
+ using Mundus.Data.SuperLayers.DBTables;
+ using NUnit.Framework;
-namespace MundusTests.DataTests.SuperLayers {
[TestFixture]
- public static class LandContextTests {
+ public static class LandContextTests
+ {
[Test]
- public static void AddsCorrectValues() {
+ public static void AddsCorrectValues()
+ {
var mob = new LMPlacedTile("mob_stock", 0, 1, 1);
var structure = new LSPlacedTile("structure_stock", 0, 2, 1);
var ground = new LGPlacedTile("ground_stock", 3, 4);
@@ -26,7 +28,8 @@ namespace MundusTests.DataTests.SuperLayers {
}
[Test]
- public static void ConsideredAliveAfterSmallDamage() {
+ public static void ConsideredAliveAfterSmallDamage()
+ {
var mob = new LMPlacedTile("mob_stock", 10, 1, 1);
var structure = new LSPlacedTile("structure_stock", 4, 2, 1);
@@ -41,7 +44,8 @@ namespace MundusTests.DataTests.SuperLayers {
}
[Test]
- public static void ConsideredDeadAfterBigDamage() {
+ public static void ConsideredDeadAfterBigDamage()
+ {
var mob = new LMPlacedTile("mob_stock", 10, 1, 1);
var structure = new LSPlacedTile("structure_stock", 4, 2, 1);
@@ -56,7 +60,8 @@ namespace MundusTests.DataTests.SuperLayers {
}
[Test]
- public static void DamagesCorrectly() {
+ public static void DamagesCorrectly()
+ {
var mob = new LMPlacedTile("mob_stock", 10, 1, 1);
var structure = new LSPlacedTile("structure_stock", 4, 2, 1);
@@ -74,7 +79,8 @@ namespace MundusTests.DataTests.SuperLayers {
}
[Test]
- public static void GetsCorrectStocks() {
+ public static void GetsCorrectStocks()
+ {
var mob = new LMPlacedTile("mob_stock", 0, 1, 1);
var structure = new LSPlacedTile("structure_stock", 0, 2, 1);
var ground = new LGPlacedTile("ground_stock", 3, 4);
@@ -92,7 +98,8 @@ namespace MundusTests.DataTests.SuperLayers {
}
[Test]
- public static void RemovesCorrectValues() {
+ public static void RemovesCorrectValues()
+ {
var mob = new LMPlacedTile("mob_stock", 0, 1, 1);
var structure = new LSPlacedTile("structure_stock", 0, 2, 1);
var ground = new LGPlacedTile("ground_stock", 3, 4);
@@ -116,7 +123,8 @@ namespace MundusTests.DataTests.SuperLayers {
[Test]
- public static void SetsCorrectValues() {
+ public static void SetsCorrectValues()
+ {
var mob = new LMPlacedTile("mob_stock", 0, 1, 1);
var newMob = new LMPlacedTile("new_mob_stock", 1, 1, 1);
var structure = new LSPlacedTile("structure_stock", 0, 2, 1);
@@ -142,7 +150,8 @@ namespace MundusTests.DataTests.SuperLayers {
}
[Test]
- public static void TruncatesTablesOnInitialization() {
+ public static void TruncatesTablesOnInitialization()
+ {
LandContext lc = new LandContext();
Assert.AreEqual(0, lc.LMobLayer.Count(), "LMobLayer table isn't properly truncated upon LandContext initialization");
diff --git a/MundusTests/DataTests/SuperLayers/SkyContextTests.cs b/MundusTests/DataTests/SuperLayers/SkyContextTests.cs
index 91a05b2..9f7f628 100644
--- a/MundusTests/DataTests/SuperLayers/SkyContextTests.cs
+++ b/MundusTests/DataTests/SuperLayers/SkyContextTests.cs
@@ -1,14 +1,16 @@
-using System;
-using System.Linq;
-using Mundus.Data.SuperLayers;
-using Mundus.Data.SuperLayers.DBTables;
-using NUnit.Framework;
+namespace MundusTests.DataTests.SuperLayers
+{
+ using System.Linq;
+ using Mundus.Data.SuperLayers;
+ using Mundus.Data.SuperLayers.DBTables;
+ using NUnit.Framework;
-namespace MundusTests.DataTests.SuperLayers {
[TestFixture]
- public static class SkyContextTests {
+ public static class SkyContextTests
+ {
[Test]
- public static void AddsCorrectValues() {
+ public static void AddsCorrectValues()
+ {
var mob = new SMPlacedTile("mob_stock", 0, 1, 1);
var structure = new SSPlacedTile("structure_stock", 0, 2, 1);
var ground = new SGPlacedTile("ground_stock", 3, 4);
@@ -26,7 +28,8 @@ namespace MundusTests.DataTests.SuperLayers {
}
[Test]
- public static void ConsideredAliveAfterSmallDamage() {
+ public static void ConsideredAliveAfterSmallDamage()
+ {
var mob = new SMPlacedTile("mob_stock", 10, 1, 1);
var structure = new SSPlacedTile("structure_stock", 4, 2, 1);
@@ -41,7 +44,8 @@ namespace MundusTests.DataTests.SuperLayers {
}
[Test]
- public static void ConsideredDeadAfterBigDamage() {
+ public static void ConsideredDeadAfterBigDamage()
+ {
var mob = new SMPlacedTile("mob_stock", 10, 1, 1);
var structure = new SSPlacedTile("structure_stock", 4, 2, 1);
@@ -56,7 +60,8 @@ namespace MundusTests.DataTests.SuperLayers {
}
[Test]
- public static void DamagesCorrectly() {
+ public static void DamagesCorrectly()
+ {
var mob = new SMPlacedTile("mob_stock", 10, 1, 1);
var structure = new SSPlacedTile("structure_stock", 4, 2, 1);
@@ -74,7 +79,8 @@ namespace MundusTests.DataTests.SuperLayers {
}
[Test]
- public static void GetsCorrectStocks() {
+ public static void GetsCorrectStocks()
+ {
var mob = new SMPlacedTile("mob_stock", 0, 1, 1);
var structure = new SSPlacedTile("structure_stock", 0, 2, 1);
var ground = new SGPlacedTile("ground_stock", 3, 4);
@@ -92,7 +98,8 @@ namespace MundusTests.DataTests.SuperLayers {
}
[Test]
- public static void RemovesCorrectValues() {
+ public static void RemovesCorrectValues()
+ {
var mob = new SMPlacedTile("mob_stock", 0, 1, 1);
var structure = new SSPlacedTile("structure_stock", 0, 2, 1);
var ground = new SGPlacedTile("ground_stock", 3, 4);
@@ -116,7 +123,8 @@ namespace MundusTests.DataTests.SuperLayers {
[Test]
- public static void SetsCorrectValues() {
+ public static void SetsCorrectValues()
+ {
var mob = new SMPlacedTile("mob_stock", 0, 1, 1);
var newMob = new SMPlacedTile("new_mob_stock", 1, 1, 1);
var structure = new SSPlacedTile("structure_stock", 0, 2, 1);
@@ -142,7 +150,8 @@ namespace MundusTests.DataTests.SuperLayers {
}
[Test]
- public static void TruncatesTablesOnInitialization() {
+ public static void TruncatesTablesOnInitialization()
+ {
SkyContext sc = new SkyContext();
Assert.AreEqual(0, sc.SMobLayer.Count(), "SMobLayer table isn't properly truncated upon SkyContext initialization");
diff --git a/MundusTests/DataTests/SuperLayers/UndergroundContextTests.cs b/MundusTests/DataTests/SuperLayers/UndergroundContextTests.cs
index 98d7679..6cb46af 100644
--- a/MundusTests/DataTests/SuperLayers/UndergroundContextTests.cs
+++ b/MundusTests/DataTests/SuperLayers/UndergroundContextTests.cs
@@ -1,14 +1,16 @@
-using System;
-using System.Linq;
-using Mundus.Data.SuperLayers;
-using Mundus.Data.SuperLayers.DBTables;
-using NUnit.Framework;
+namespace MundusTests.DataTests.SuperLayers
+{
+ using System.Linq;
+ using Mundus.Data.SuperLayers;
+ using Mundus.Data.SuperLayers.DBTables;
+ using NUnit.Framework;
-namespace MundusTests.DataTests.SuperLayers {
[TestFixture]
- public static class UndergroundContextTests {
+ public static class UndergroundContextTests
+ {
[Test]
- public static void AddsCorrectValues() {
+ public static void AddsCorrectValues()
+ {
var mob = new UMPlacedTile("mob_stock", 0, 1, 1);
var structure = new USPlacedTile("structure_stock", 0, 2, 1);
var ground = new UGPlacedTile("ground_stock", 3, 4);
@@ -26,7 +28,8 @@ namespace MundusTests.DataTests.SuperLayers {
}
[Test]
- public static void ConsideredAliveAfterSmallDamage() {
+ public static void ConsideredAliveAfterSmallDamage()
+ {
var mob = new UMPlacedTile("mob_stock", 10, 1, 1);
var structure = new USPlacedTile("structure_stock", 4, 2, 1);
@@ -41,7 +44,8 @@ namespace MundusTests.DataTests.SuperLayers {
}
[Test]
- public static void ConsideredDeadAfterBigDamage() {
+ public static void ConsideredDeadAfterBigDamage()
+ {
var mob = new UMPlacedTile("mob_stock", 10, 1, 1);
var structure = new USPlacedTile("structure_stock", 4, 2, 1);
@@ -56,7 +60,8 @@ namespace MundusTests.DataTests.SuperLayers {
}
[Test]
- public static void DamagesCorrectly() {
+ public static void DamagesCorrectly()
+ {
var mob = new UMPlacedTile("mob_stock", 10, 1, 1);
var structure = new USPlacedTile("structure_stock", 4, 2, 1);
@@ -74,7 +79,8 @@ namespace MundusTests.DataTests.SuperLayers {
}
[Test]
- public static void GetsCorrectStocks() {
+ public static void GetsCorrectStocks()
+ {
var mob = new UMPlacedTile("mob_stock", 0, 1, 1);
var structure = new USPlacedTile("structure_stock", 0, 2, 1);
var ground = new UGPlacedTile("ground_stock", 3, 4);
@@ -92,7 +98,8 @@ namespace MundusTests.DataTests.SuperLayers {
}
[Test]
- public static void RemovesCorrectValues() {
+ public static void RemovesCorrectValues()
+ {
var mob = new UMPlacedTile("mob_stock", 0, 1, 1);
var structure = new USPlacedTile("structure_stock", 0, 2, 1);
var ground = new UGPlacedTile("ground_stock", 3, 4);
@@ -116,7 +123,8 @@ namespace MundusTests.DataTests.SuperLayers {
[Test]
- public static void SetsCorrectValues() {
+ public static void SetsCorrectValues()
+ {
var mob = new UMPlacedTile("mob_stock", 0, 1, 1);
var newMob = new UMPlacedTile("new_mob_stock", 1, 1, 1);
var structure = new USPlacedTile("structure_stock", 0, 2, 1);
@@ -142,7 +150,8 @@ namespace MundusTests.DataTests.SuperLayers {
}
[Test]
- public static void TruncatesTablesOnInitialization() {
+ public static void TruncatesTablesOnInitialization()
+ {
UndergroundContext uc = new UndergroundContext();
Assert.AreEqual(0, uc.UMobLayer.Count(), "UMobLayer table isn't properly truncated upon UndergroundContext initialization");
diff --git a/MundusTests/MundusTests.csproj b/MundusTests/MundusTests.csproj
index 75aab6b..820627c 100644
--- a/MundusTests/MundusTests.csproj
+++ b/MundusTests/MundusTests.csproj
@@ -177,6 +177,16 @@
<Compile Include="DataTests\SuperLayers\LandContextTests.cs" />
<Compile Include="DataTests\SuperLayers\SkyContextTests.cs" />
<Compile Include="DataTests\SuperLayers\UndergroundContextTests.cs" />
+ <Compile Include="DataTests\SuperLayers\DBTables\LGPlacedTileTests.cs" />
+ <Compile Include="DataTests\SuperLayers\DBTables\LMPlacedTileTests.cs" />
+ <Compile Include="DataTests\SuperLayers\DBTables\LSPlacedTile.cs" />
+ <Compile Include="DataTests\SuperLayers\DBTables\SGPlacedTileTests.cs" />
+ <Compile Include="DataTests\SuperLayers\DBTables\SMPlacedTileTests.cs" />
+ <Compile Include="DataTests\SuperLayers\DBTables\SSPlacedTileTests.cs" />
+ <Compile Include="DataTests\SuperLayers\DBTables\UGPlacedTileTests.cs" />
+ <Compile Include="DataTests\SuperLayers\DBTables\UMPlacedTileTests.cs" />
+ <Compile Include="DataTests\SuperLayers\DBTables\USPlacedTileTests.cs" />
+ <Compile Include="DataTests\DataBaseContextsTests.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
@@ -186,6 +196,7 @@
<Folder Include="DataTests\GameEventLogs\" />
<Folder Include="DataTests\Crafting\" />
<Folder Include="DataTests\SuperLayers\" />
+ <Folder Include="DataTests\SuperLayers\DBTables\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Mundus\Mundus.csproj">