public void ThrowsExceptionOnWrongInstruction() { var cleanLines = SetupGCode(); InstructionParameterExtractor extractor = new InstructionParameterExtractor(cleanLines, null); Assert.ThrowsException <FormatException>(() => extractor.ExtractParameterValues("ABCDEfGHIJH")); }
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); }