Ejemplo n.º 1
0
        public void BitmapEditor_GetExtensions_InvokeCustomExtenders_ReturnsExpected()
        {
            var editor = new CustomGetImageExtendersEditor();

            string[] extensions = editor.GetExtensions();
            Assert.Equal(new string[] { "bmp", "gif", "jpg", "jpeg", "png", "ico" }, extensions);
            Assert.NotSame(extensions, editor.GetExtensions());
        }
Ejemplo n.º 2
0
        public void ImageEditor_GetExtensions_InvokeInvalid_ReturnsExpected()
        {
            var editor = new CustomGetImageExtendersEditor();

            editor.GetImageExtendersResult = new Type[] { typeof(object), null };
            Assert.Empty(editor.GetExtensions());
            Assert.Equal(1, editor.GetImageExtendersCallCount);
        }
Ejemplo n.º 3
0
        public void ImageEditor_GetExtensions_InvokeCustom_CallsGetImageExtendersOnce()
        {
            var editor = new CustomGetImageExtendersEditor();

            editor.GetImageExtendersResult = new Type[] { typeof(PublicImageEditor), typeof(PrivateImageEditor), typeof(ImageEditor), typeof(NullExtensionsImageEditor) };
            Assert.Equal(new string[] { "PublicImageEditor", "PrivateImageEditor" }, editor.GetExtensions());
            Assert.Equal(1, editor.GetImageExtendersCallCount);
        }