Exemple #1
0
        public void RoomInstruction_WithCommentAndEmptyLine_InstructionsCorrect()
        {
            var room = RoomInstruction.FromStrings(CreateLines("// Bathroom //", "Room:(0,0)", "", "Floor:(1,1)"));

            Assert.AreEqual(1, room.ObjectInstructions.Count);
        }
Exemple #2
0
        public void RoomInstruction_WithRangeInstruction_InstructionsCorrect()
        {
            var room = RoomInstruction.FromStrings(CreateLines("Room:(0,0)", "Floor:(1,1)-(3,3)"));

            Assert.AreEqual(9, room.ObjectInstructions.Count);
        }
Exemple #3
0
        public void RoomInstruction_OneObjectInstruction_InstructionsCorrect()
        {
            var room = RoomInstruction.FromStrings(CreateLines("Room:(0,0)", "Obj:(1,1)"));

            Assert.AreEqual(1, room.ObjectInstructions.Count);
        }
Exemple #4
0
        public void RoomInstruction_TwoObjectInstructionLines_InstructionsCorrect()
        {
            var room = RoomInstruction.FromStrings(CreateLines("Room:(0,0)", "Obj1:(1,1);(1,2)", "Obj2:(1,3)"));

            Assert.AreEqual(3, room.ObjectInstructions.Count);
        }
Exemple #5
0
 public void RoomInstructions_InvalidInputStrings_ThrowsArgumentException()
 {
     ExceptionAssert.Throws <ArgumentException>(() => RoomInstruction.FromStrings(CreateLines()));
     ExceptionAssert.Throws <ArgumentException>(() => RoomInstruction.FromStrings(CreateLines("Obj:(1,1)")));
 }