public void Double_field_path()
        {
            var config = new Chinook();
            var factory = new Factory();
            var adapter = new FieldPathComboAdapter(factory);

            var path = new FieldPath(config["Track"]["AlbumId"], config["Album"]["Title"]);
            var fields1 = factory.GetFields(path[0].Subject);
            var fields2 = factory.GetFields(path[1].Subject);

            adapter.SelectedPath = path;
            Assert.AreEqual(2, adapter.Items.Count);
            Assert.AreEqual(fields1.Count, adapter.Items[0].Fields.Count);
            Assert.AreEqual(fields2.Count, adapter.Items[1].Fields.Count);
            Assert.Contains(path[0], adapter.Items[0].Fields);
            Assert.Contains(path[1], adapter.Items[1].Fields);
        }
        public void Incomplete_field_path()
        {
            var config = new Chinook();
            var factory = new Factory();
            var adapter = new FieldPathComboAdapter(factory);

            var path = new FieldPath(config["Track"]["AlbumId"], config["Album"]["ArtistId"]);
            var fields1 = factory.GetFields(path[0].Subject);
            var fields2 = factory.GetFields(path[1].Subject);
            var fields3 = factory.GetFields(config["Artist"]); // this should be added by SelectedPath

            adapter.SelectedPath = path;
            Assert.AreEqual(3, adapter.Items.Count);
            Assert.AreEqual(fields1.Count, adapter.Items[0].Fields.Count);
            Assert.AreEqual(fields2.Count, adapter.Items[1].Fields.Count);
            Assert.AreEqual(fields3.Count, adapter.Items[2].Fields.Count);
            Assert.Contains(path[0], adapter.Items[0].Fields);
            Assert.Contains(path[1], adapter.Items[1].Fields);
            Assert.Contains(path[2], adapter.Items[2].Fields);
        }
        public void Single_field_path()
        {
            var config = new Chinook();
            var factory = new Factory();
            var adapter = new FieldPathComboAdapter(factory);

            var path = new FieldPath(config["Track"]["Name"]);
            var fields = factory.GetFields(path[0].Subject);

            adapter.SelectedPath = path;
            Assert.AreEqual(1, adapter.Items.Count);
            Assert.AreEqual(fields.Count, adapter.Items[0].Fields.Count);
            Assert.Contains(path[0], adapter.Items[0].Fields);
        }