Esempio n. 1
0
        public void ThrowsExceptionOnWrongInstruction()
        {
            var cleanLines = SetupGCode();

            InstructionParameterExtractor extractor = new InstructionParameterExtractor(cleanLines, null);

            Assert.ThrowsException <FormatException>(() => extractor.ExtractParameterValues("ABCDEfGHIJH"));
        }
Esempio n. 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);
        }