Exemplo n.º 1
0
        public void TestGetFurnishing()
        {
            var furnishing = StaticDatabaseConnection.GetFurnishingDetails("TestFurnishing2");

            Assert.AreEqual('*', furnishing.Symbol);
            Assert.IsTrue(furnishing.Traits.Contains(Entities.Trait.TestTrait1));
        }
        public void TestGetFurnishing()
        {
            var furnishing = StaticDatabaseConnection.GetFurnishingDetails("IcyPillar");

            Assert.AreEqual('*', furnishing.Symbol);
            Assert.IsTrue(furnishing.Traits.Contains(Entities.Trait.BlockMove));
        }
Exemplo n.º 3
0
        public void TestErrorHandling()
        {
            // MapTiles
            ErrorLogger.ClearTestMessages();
            var tile1 = StaticDatabaseConnection.GetMapTileDetails(Entities.MapTiles.TileType.TestTile3);

            Assert.AreEqual("Unknown map tile type: TestTile3", ErrorLogger.GetNextTestMessage());

            Assert.AreEqual(defaultDebugMessage, ErrorLogger.GetNextTestMessage());

            Assert.AreEqual("GraySeven", tile1.BackgroundColor);
            Assert.AreEqual("GrayFour", tile1.FogColor);

            // Furnishings
            ErrorLogger.ClearTestMessages();
            var furnishingDetails = StaticDatabaseConnection.GetFurnishingDetails("Not A Furnishing");

            Assert.AreEqual("Unknown furnishing: Not A Furnishing", ErrorLogger.GetNextTestMessage());

            Assert.AreEqual(defaultDebugMessage, ErrorLogger.GetNextTestMessage());

            Assert.AreEqual('#', furnishingDetails.Symbol);
            Assert.AreEqual("Red", furnishingDetails.FGColorName);
        }