예제 #1
0
        public void ThrowsExceptionOnWrongInstruction()
        {
            var cleanLines = SetupGCode();

            InstructionParameterExtractor extractor = new InstructionParameterExtractor(cleanLines, null);

            Assert.ThrowsException <FormatException>(() => extractor.ExtractParameterValues("ABCDEfGHIJH"));
        }
예제 #2
0
        public void ExtractsValuesForInstructionOnCorrect()
        {
            List <string> cleanLines = SetupGCode();

            InstructionParameterExtractor extractor = new InstructionParameterExtractor(cleanLines, null);
            var          actual   = extractor.ExtractParameterValues("M190");
            List <float> expected = new List <float>();

            expected.Add(60f);

            CollectionAssert.AreEqual(expected, actual);
        }