public void Parent_Class1ContainsProperty_ReturnsClass1()
        {
            helper.CreateProperty("MyProperty");
            helper.AddParentClass("Tests.Class1");
            CreateCodeProperty2();

            global::EnvDTE.CodeClass parentClass = property.Parent;

            Assert.AreEqual("Tests.Class1", parentClass.FullName);
        }
Ejemplo n.º 2
0
        public void Parent_Class1ContainsProperty_ReturnsClass1()
        {
            CreateCodeProperty2(
                "namespace Tests {\r\n" +
                "    class Class1 {\r\n" +
                "        public int MyProperty { get; set; }\r\n" +
                "    }\r\n" +
                "}");

            global::EnvDTE.CodeClass parentClass = property.Parent;

            Assert.AreEqual("Tests.Class1", parentClass.FullName);
        }