Example #1
0
        public void ParseInstruction_Returns_Correct_Destinations(string dest, ComputeDestinationType expected)
        {
            var parser = new ComputeDestinationParser();

            // act
            ComputeDestinationType result = parser.ParseComputeDestination(dest);

            // assert
            Assert.AreEqual(expected, result);
        }
Example #2
0
        public void ParseInstruction_Throws_ArgumentException_When_Destination_Cannot_Be_Parsed()
        {
            const string dest   = "ACDC";
            var          parser = new ComputeDestinationParser();

            // act
            TestDelegate testAction = () => parser.ParseComputeDestination(dest);

            // assert
            Assert.Throws <ArgumentException>(testAction);
        }