Exemplo n.º 1
0
        public void Add1()
        {
            var test = new LineCommand();

            Assert.AreEqual(test.Add('G', 10.1, 1), true);
            {
                Double value;
                int    pos;
                Assert.AreEqual(test.TryGetValue('G', out value, out pos), true);
                Assert.AreEqual(value, 10.1);
                Assert.AreEqual(pos, 0);
                Assert.AreEqual(test.GetFP('G'), 1);
            }
        }
Exemplo n.º 2
0
        public void Add3()
        {
            var line = "G10.00";
            var test = new LineCommand();

            test.Parse(line);
            Assert.AreEqual(test.Add('G', 10.1, 1), false);
            {
                Double value;
                int    pos;
                Assert.AreEqual(test.TryGetValue('G', out value, out pos), true);
                Assert.AreEqual(value, 10.0);
                Assert.AreEqual(pos, 0);
                Assert.AreEqual(test.GetFP('G'), 2);
            }
        }