示例#1
0
        public void MapInstructionTests_OneLayer_ContainsOneLayer()
        {
            var map = MapInstruction.FromStrings(CreateLines("Layer: Size=(3,3)"));

            Assert.AreEqual(1, map.Layers.Count);
            Assert.AreEqual(0, map.Portals.Count);
        }
示例#2
0
        public void MapInstructionTest_OnePortal_ContainsOnePortal()
        {
            var map = MapInstruction.FromStrings(CreateLines("Portal-Door:(1,1,1);End1=(OffMap);End2=(OffMap)"));

            Assert.AreEqual(0, map.Layers.Count);
            Assert.AreEqual(1, map.Portals.Count);
        }
示例#3
0
        public void MapInstructionTests_Nothing_IsEmptyMap()
        {
            var map = MapInstruction.FromStrings(CreateLines());

            Assert.AreEqual(0, map.Layers.Count);
            Assert.AreEqual(0, map.Portals.Count);
        }
 private MapInstruction CreateInstruction(params string[] args)
 {
     return(MapInstruction.FromStrings(args.ToList()));
 }