public void GetKeyPart_NumberMustNamed(string part)
        {
            var ag   = new ValueConfigurationVisitor(new string[0]);
            var type = ag.GetPartType(part);

            Assert.AreEqual(ConfigurationPartTypes.Named, type);
        }
        public void GetKeyPart_NumberMustArrayIndex(string part)
        {
            var set = new string[0];
            var ag  = new ValueConfigurationVisitor(set);

            Assert.AreEqual(set, ag.Parts);
            var type = ag.GetPartType(part);

            Assert.AreEqual(ConfigurationPartTypes.ArrayIndex, type);
        }
        public void Visit_AllPartVisited()
        {
            var set = new string[]
            {
                "hello",
                "world",
                "I",
                "am",
                "fine"
            };
            var ag = new ValueConfigurationVisitor(set);

            ag.VisitOk = true;
            ag.VisitWrite();
            var notVisitPart = set.Except(ag.Parts).ToArray();

            if (notVisitPart.Length != 0)
            {
                Assert.Fail("The parts {0} does not visited", string.Join(",", notVisitPart));
            }
        }