コード例 #1
0
        public void GetImageIndexTest()
        {
            ImageList list = new ImageList();
            ConfigurationNodeImageContainer imageContainer = new ConfigurationNodeImageContainer(list);
            int imageIndex = imageContainer.GetImageIndex(typeof(MyNode));
            int selectedImageIndex = imageContainer.GetSelectedImageIndex(typeof(MyNode));
            Assert.IsTrue(imageIndex >= 0);
            Assert.IsTrue(selectedImageIndex >= 0);

            Assert.AreEqual(2, list.Images.Count);
        }
コード例 #2
0
        public void GetImageIndexTest()
        {
            ImageList list = new ImageList();
            ConfigurationNodeImageContainer imageContainer = new ConfigurationNodeImageContainer(list);
            int imageIndex         = imageContainer.GetImageIndex(typeof(MyNode));
            int selectedImageIndex = imageContainer.GetSelectedImageIndex(typeof(MyNode));

            Assert.IsTrue(imageIndex >= 0);
            Assert.IsTrue(selectedImageIndex >= 0);

            Assert.AreEqual(2, list.Images.Count);
        }