Beispiel #1
0
        public void Values6()
        {
            string line = "G1 Z5.5";
            var    test = new LineCommand();

            Assert.AreEqual(test.Parse(line), true);
            Assert.AreEqual(test.Modify('A', (x) => {
                x.Value = 5;
            }), false);
            Assert.AreEqual(test.Modify('G', (x) => {
                x.Value    = 5;
                x.FP       = 1;
                x.Position = 2;
            }), true);
            {
                Double value;
                int    pos;
                Assert.AreEqual(test.TryGetValue('G', out value, out pos), true);
                Assert.AreEqual(value, 5);
                Assert.AreEqual(pos, 2);
                Assert.AreEqual(test.GetFP('G'), 1);
            }
        }