2020-10-09 16:17:41 +00:00
|
|
|
import unittest
|
|
|
|
|
|
|
|
from dungeonbattle.interfaces import Map
|
|
|
|
|
|
|
|
|
|
|
|
class TestInterfaces(unittest.TestCase):
|
2020-10-09 16:24:13 +00:00
|
|
|
def test_map(self) -> None:
|
2020-10-16 16:05:49 +00:00
|
|
|
"""
|
|
|
|
Create a map and check that it is well parsed.
|
|
|
|
"""
|
2020-10-16 16:22:20 +00:00
|
|
|
m = Map.load_from_string(".█\n█.\n")
|
2020-10-09 16:17:41 +00:00
|
|
|
self.assertEqual(m.width, 2)
|
|
|
|
self.assertEqual(m.height, 2)
|
2020-10-16 16:22:20 +00:00
|
|
|
self.assertEqual(m.draw_string(), ".█\n█.")
|