Example #1
0
 public void ConvertStringToHeadingWithNullValueShouldThrowException()
 {
     Assert.ThrowsException <ArgumentNullException>(() =>
     {
         var result = InstructionHelper.ConvertStringToHeading(null);
     });
 }
Example #2
0
        public void ConvertStringToHeadingWithLowerWValueShouldReturnInteger()
        {
            var value = "w";

            var result = InstructionHelper.ConvertStringToHeading(value);

            Assert.AreEqual(Heading.West, result);
        }
Example #3
0
        public void ConvertStringToHeadingWithEmptyValueShouldThrowException()
        {
            var value = string.Empty;

            Assert.ThrowsException <ArgumentException>(() =>
            {
                var result = InstructionHelper.ConvertStringToHeading(value);
            });
        }
Example #4
0
        public void ConvertStringToHeadingWithInvalidSingleCharacterValueShouldThrowException()
        {
            var value = "f";

            Assert.ThrowsException <ArgumentException>(() =>
            {
                var result = InstructionHelper.ConvertStringToHeading(value);
            });
        }