コード例 #1
0
        public void testMetadataProcess()
        {
            MetadataList ml = new MetadataList(examplesPath);

            Assert.AreEqual(14, ml.Files.Length);
            ml.processMetadataList();
            Assert.AreEqual(14, ml.List.Count);
        }
コード例 #2
0
        public void loadListBox()
        {
            System.Windows.Forms.ListBox listbox = new System.Windows.Forms.ListBox();
            listbox.Items.Add("Item 1");
            Assert.AreEqual(1, listbox.Items.Count);
            MetadataList metadatalist = new MetadataList(examplesPath);

            metadatalist.processMetadataList();
            foreach (Metadata metadata in metadatalist.List)
            {
                listbox.Items.Add(metadata.getTitle());
            }
            Assert.AreEqual(15, listbox.Items.Count);  // 14 files plus first item
        }