Example #1
0
        public void UnregisterWithNullArgTest()
        {
            EditorFactoryNotifyForProjectAttribute target = new EditorFactoryNotifyForProjectAttribute(projectType, fileExtension, factoryType);
            MockRegistrationContext context = null;

            target.Unregister(context);
        }
Example #2
0
        public void ConstructorWithFactoryTypeNullArgTest()
        {
            factoryType = null;
            EditorFactoryNotifyForProjectAttribute target = new EditorFactoryNotifyForProjectAttribute(projectType, fileExtension, factoryType);

            Assert.IsNotNull(target, "Failed to initialize new instance of type EditorFactoryNotifyForProjectAttribute");
        }
Example #3
0
        public void ProjectTypeTest()
        {
            EditorFactoryNotifyForProjectAttribute target = new EditorFactoryNotifyForProjectAttribute(projectType, fileExtension, factoryType);
            Guid val = new Guid("{8a333fe3-2e11-42d9-8f6b-ae761e3b0588}");

            Assert.AreEqual(val, target.ProjectType, "Microsoft.Samples.VisualStudio.SynchronousXmlDesigner.Attributes.EditorFactoryNotify" +
                            "ForProjectAttribute.ProjectType was not set correctly.");
        }
Example #4
0
        public void FileExtensionTest()
        {
            EditorFactoryNotifyForProjectAttribute target = new EditorFactoryNotifyForProjectAttribute(projectType, fileExtension, factoryType);
            string val = "TXT";

            Assert.AreEqual(val, target.FileExtension, "Microsoft.Samples.VisualStudio.SynchronousXmlDesigner.Attributes.EditorFactoryNotify" +
                            "ForProjectAttribute.FileExtension was not set correctly.");
        }
Example #5
0
        public void UnregisterTest()
        {
            EditorFactoryNotifyForProjectAttribute target = new EditorFactoryNotifyForProjectAttribute(projectType, fileExtension, factoryType);

            using (MockRegistrationContext context = new MockRegistrationContext())
            {
                target.Unregister(context);
            }
        }
Example #6
0
        public void FactoryTypeTest()
        {
            EditorFactoryNotifyForProjectAttribute target = new EditorFactoryNotifyForProjectAttribute(projectType,
                                                                                                       fileExtension, factoryType);
            Guid val = new Guid("{3e8702a1-d26f-4b91-bdc2-7ea0022b696c}");

            Assert.AreEqual(val, target.FactoryType, "Microsoft.Samples.VisualStudio.SynchronousXmlDesigner.Attributes.EditorFactoryNotify" +
                            "ForProjectAttribute.FactoryType was not set correctly.");
        }
Example #7
0
        public void ConstructorTestArgumentException1()
        {
            object projectType   = (int)0;      // TODO: Initialize to an appropriate value
            string fileExtension = null;        // TODO: Initialize to an appropriate value
            object factoryType   = typeof(int); // TODO: Initialize to an appropriate value

            EditorFactoryNotifyForProjectAttribute target = new EditorFactoryNotifyForProjectAttribute(projectType, fileExtension, factoryType);

            Assert.IsNotNull(target, "Failed to initialize new instance of type EditorFactoryNotifyForProjectAttribute");
        }
        public void ConstructorTest1()
        {
            EditorFactoryNotifyForProjectAttribute target = new EditorFactoryNotifyForProjectAttribute(projectType, fileExtension, factoryType);
            Assert.IsNotNull(target, "Failed to initialize new instance of type EditorFactoryNotifyForProjectAttribute");

            String factoryTypeString = "{3e8702a1-d26f-4b91-bdc2-7ea0022b696c}";
            projectType = new Guid("{3e8702a1-d26f-4b91-bdc2-7ea0022b696c}");
            EditorFactoryNotifyForProjectAttribute targetFromString = new EditorFactoryNotifyForProjectAttribute(projectType, fileExtension, factoryTypeString);
            Assert.IsNotNull(targetFromString, "Failed to initialize new instance of type EditorFactoryNotifyForProjectAttribute from String");

            factoryType = typeof(int);
            projectType = typeof(int);

            EditorFactoryNotifyForProjectAttribute targetFromType = new EditorFactoryNotifyForProjectAttribute(projectType, fileExtension, factoryType);
            Assert.IsNotNull(targetFromType, "Failed to initialize new instance of type EditorFactoryNotifyForProjectAttribute from Type");
        }
Example #9
0
        public void ConstructorTest1()
        {
            EditorFactoryNotifyForProjectAttribute target = new EditorFactoryNotifyForProjectAttribute(projectType, fileExtension, factoryType);

            Assert.IsNotNull(target, "Failed to initialize new instance of type EditorFactoryNotifyForProjectAttribute");

            String factoryTypeString = "{3e8702a1-d26f-4b91-bdc2-7ea0022b696c}";

            projectType = new Guid("{3e8702a1-d26f-4b91-bdc2-7ea0022b696c}");
            EditorFactoryNotifyForProjectAttribute targetFromString = new EditorFactoryNotifyForProjectAttribute(projectType, fileExtension, factoryTypeString);

            Assert.IsNotNull(targetFromString, "Failed to initialize new instance of type EditorFactoryNotifyForProjectAttribute from String");

            factoryType = typeof(int);
            projectType = typeof(int);

            EditorFactoryNotifyForProjectAttribute targetFromType = new EditorFactoryNotifyForProjectAttribute(projectType, fileExtension, factoryType);

            Assert.IsNotNull(targetFromType, "Failed to initialize new instance of type EditorFactoryNotifyForProjectAttribute from Type");
        }
        public void ConstructorTestArgumentException()
        {
            object projectType = typeof(int); // TODO: Initialize to an appropriate value
            string fileExtension = null; // TODO: Initialize to an appropriate value
            object factoryType = (int)0; // TODO: Initialize to an appropriate value

            EditorFactoryNotifyForProjectAttribute target = new EditorFactoryNotifyForProjectAttribute(projectType, fileExtension, factoryType);
            Assert.IsNotNull(target, "Failed to initialize new instance of type EditorFactoryNotifyForProjectAttribute");
        }
 public void UnregisterWithNullArgTest()
 {
     EditorFactoryNotifyForProjectAttribute target = new EditorFactoryNotifyForProjectAttribute(projectType, fileExtension, factoryType);
     MockRegistrationContext context = null;
     target.Unregister(context);
 }
 public void UnregisterTest()
 {
     EditorFactoryNotifyForProjectAttribute target = new EditorFactoryNotifyForProjectAttribute(projectType, fileExtension, factoryType);
     using (MockRegistrationContext context = new MockRegistrationContext())
     {
         target.Unregister(context);
     }
 }
        public void ProjectTypeTest()
        {
            EditorFactoryNotifyForProjectAttribute target = new EditorFactoryNotifyForProjectAttribute(projectType, fileExtension, factoryType);
            Guid val = new Guid("{8a333fe3-2e11-42d9-8f6b-ae761e3b0588}");

            Assert.AreEqual(val, target.ProjectType, "Microsoft.Samples.VisualStudio.SynchronousXmlDesigner.Attributes.EditorFactoryNotify" +
                    "ForProjectAttribute.ProjectType was not set correctly.");
        }
        public void ProjectFileExtensionPathTest()
        {
            EditorFactoryNotifyForProjectAttribute target = new EditorFactoryNotifyForProjectAttribute(projectType, fileExtension, factoryType);
            string extension = "TXT";

            Assert.AreEqual(extension, target.FileExtension,
            "Microsoft.Samples.VisualStudio.SynchronousXmlDesigner.Attributes.EditorFactoryNotify" +
                    "ForProjectAttribute.ProjectFileExtensionPath was not set correctly.");
        }
        public void FactoryTypeTest()
        {
            EditorFactoryNotifyForProjectAttribute target = new EditorFactoryNotifyForProjectAttribute(projectType,
            fileExtension, factoryType);
            Guid val = new Guid("{3e8702a1-d26f-4b91-bdc2-7ea0022b696c}");

            Assert.AreEqual(val, target.FactoryType, "Microsoft.Samples.VisualStudio.SynchronousXmlDesigner.Attributes.EditorFactoryNotify" +
            "ForProjectAttribute.FactoryType was not set correctly.");
        }
 public void ConstructorWithProjectTypeNullArgTest()
 {
     projectType = null;
     EditorFactoryNotifyForProjectAttribute target = new EditorFactoryNotifyForProjectAttribute(projectType, fileExtension, factoryType);
     Assert.IsNotNull(target, "Failed to initialize new instance of type EditorFactoryNotifyForProjectAttribute");
 }