コード例 #1
0
        public void NamePropertyTest()
        {
            string name = "Some random name";
            OANestedProjectProperty testProperty = VisualStudio_Project_Samples_OANestedProjectPropertyAccessor.CreatePrivate(projectProperties, name);

            Assert.IsNotNull(testProperty, "The OANestedProjectProperty instance was not created successfully.");
            Assert.AreEqual(name, testProperty.Name, "ProjectProperty Name was initialized by unexpected value.");
        }
コード例 #2
0
        public void ApplicationPropertyTest()
        {
            string name = "Some random name";
            OANestedProjectProperty testProperty = VisualStudio_Project_Samples_OANestedProjectPropertyAccessor.CreatePrivate(projectProperties, name);

            Assert.IsNotNull(testProperty, "The OANestedProjectProperty instance was not created successfully.");
            Assert.IsNull(testProperty.Application, "Application property was returned as initialized value.");
        }
コード例 #3
0
        public void NumIndicesPropertyTest()
        {
            string name          = "Some Random Name";
            short  expectedValue = 0;
            OANestedProjectProperty testProperty = VisualStudio_Project_Samples_OANestedProjectPropertyAccessor.CreatePrivate(projectProperties, name);

            Assert.IsNotNull(testProperty, "The OANestedProjectProperty instance was not created successfully.");
            Assert.AreEqual(expectedValue, testProperty.NumIndices, "Property NumIndices was returned unexpected value.");
        }
コード例 #4
0
        public void ValueAsNullPropertyTest()
        {
            string name = "SomeRandomName";
            OANestedProjectProperty testProperty = VisualStudio_Project_Samples_OANestedProjectPropertyAccessor.CreatePrivate(projectProperties, name);

            Assert.IsNotNull(testProperty, "The OANestedProjectProperty instance was not created successfully.");

            testProperty.Value = null;
        }
コード例 #5
0
        public void set_IndexedValueTest()
        {
            string name = "Some Random Name";
            OANestedProjectProperty testProperty = VisualStudio_Project_Samples_OANestedProjectPropertyAccessor.CreatePrivate(projectProperties, name);

            Assert.IsNotNull(testProperty, "The OANestedProjectProperty instance was not created successfully.");

            // simply call this method
            testProperty.set_IndexedValue(null, null, null, null, null);
        }
コード例 #6
0
        public void InternalConstructorTest()
        {
            Assert.IsNotNull(nestedProject.Properties, "Node Properties was uninitialized.");
            Assert.IsTrue((nestedProject.Properties is OANestedProjectProperties), "Returned Node Properties was initialized by unexpected type value.");

            string name = "Some random name";
            OANestedProjectProperty testProperty = VisualStudio_Project_Samples_OANestedProjectPropertyAccessor.CreatePrivate(projectProperties, name);

            Assert.IsNotNull(testProperty, "The OANestedProjectProperty instance was not created successfully.");
        }
コード例 #7
0
        public void get_IndexedValueTest()
        {
            string name = "Some Random Name";
            OANestedProjectProperty testProperty = VisualStudio_Project_Samples_OANestedProjectPropertyAccessor.CreatePrivate(projectProperties, name);

            Assert.IsNotNull(testProperty, "The OANestedProjectProperty instance was not created successfully.");

            object actualValue = testProperty.get_IndexedValue(null, null, null, null);

            Assert.IsNull(actualValue, "Method get_IndexValue was returned unexpected value.");
        }
コード例 #8
0
        public void ObjectAndValuePropertiesTest()
        {
            string name = "SomeRandomName";
            OANestedProjectProperty testProperty = VisualStudio_Project_Samples_OANestedProjectPropertyAccessor.CreatePrivate(projectProperties, name);

            Assert.IsNotNull(testProperty, "The OANestedProjectProperty instance was not created successfully.");

            testProperty.Object = name;

            Assert.AreEqual((object)name, testProperty.Object, "ProjectProperty Object was initialized by unexpected value.");
            Assert.AreEqual((object)name, testProperty.Value, "ProjectProperty Value was initialized by unexpected value.");
            Assert.IsTrue(nestedProject.IsDirty, "After property changing IsDirty flag was not set to the false");
        }
コード例 #9
0
        public void let_ValueMethodTest()
        {
            string name = "SomeRandomName";
            OANestedProjectProperty testProperty = VisualStudio_Project_Samples_OANestedProjectPropertyAccessor.CreatePrivate(projectProperties, name);

            Assert.IsNotNull(testProperty, "The OANestedProjectProperty instance was not created successfully.");

            int expectedValue = 77777;

            testProperty.let_Value(expectedValue);

            Assert.AreEqual(expectedValue.ToString(), testProperty.Value, "ProjectProperty Value was initialized by unexpected value.");
            Assert.IsTrue(nestedProject.IsDirty, "After property changing IsDirty flag was not set to the false");
        }