Ejemplo n.º 1
0
        public void QueryExecutor_ParseDefaultTopAndGrowth6()
        {
            var acc = StorageContextAccessor.Create();

            try
            {
                var x = acc.ParseDefaultTopAndGrowth("10, 0, 0");
                Assert.Fail("ConfigurationException was not thrown.");
            }
            catch (System.Reflection.TargetInvocationException e)
            {
                Assert.IsInstanceOfType(e.InnerException, typeof(ConfigurationException));
            }
        }
Ejemplo n.º 2
0
        public void QueryExecutor_ParseDefaultTopAndGrowth1()
        {
            var acc = StorageContextAccessor.Create();

            var tops = acc.ParseDefaultTopAndGrowth("0").ToArray();

            Assert.IsTrue(tops.Length == 1, String.Format("#1: tops.length is {0}, expected: 1", tops.Length));
            Assert.IsTrue(tops[0] == 0, String.Format("#2: tops[0] is {0}, expected: 0", tops[0]));

            tops = acc.ParseDefaultTopAndGrowth("10").ToArray();

            Assert.IsTrue(tops.Length == 1, String.Format("#3: tops.length is {0}, expected: 1", tops.Length));
            Assert.IsTrue(tops[0] == 10, String.Format("#4: tops[0] is {0}, expected: 10", tops[0]));

            tops = acc.ParseDefaultTopAndGrowth("10, 20, 0").ToArray();

            Assert.IsTrue(tops.Length == 3, String.Format("#5: tops.length is {0}, expected: 3", tops.Length));
            Assert.IsTrue(tops[0] == 10, String.Format("#6: tops[0] is {0}, expected: 10", tops[0]));
            Assert.IsTrue(tops[1] == 20, String.Format("#7: tops[1] is {0}, expected: 20", tops[1]));
            Assert.IsTrue(tops[2] == 0, String.Format("#8: tops[2] is {0}, expected: 0", tops[2]));
        }