示例#1
0
 IMethod[] GetOverridableMethods(IClass baseClass)
 {
     return(OverrideCompletionDataProvider.GetOverridableMethods(new MockClass("DerivedClass")
     {
         BaseType = baseClass.DefaultReturnType
     }));
 }
示例#2
0
 protected override void InitContent()
 {
     foreach (IMethod m in OverrideCompletionDataProvider.GetOverridableMethods(currentClass))
     {
         Content.Add(new MethodWrapper(m));
     }
     Content.Sort();
 }
 protected override void InitContent()
 {
     foreach (IProperty p in OverrideCompletionDataProvider.GetOverridableProperties(currentClass))
     {
         Content.Add(new PropertyWrapper(p));
     }
     Content.Sort();
 }
示例#4
0
        public void OverridableMethodPartOfClass()
        {
            MockMethod method = new MockMethod("Run");

            method.DeclaringType = c;
            method.IsOverridable = true;
            returnType.Methods.Add(method);

            IMethod[] methods = OverrideCompletionDataProvider.GetOverridableMethods(c);

            AssertAreMethodsEqual(expectedMethods, methods);
        }
示例#5
0
        public void OverridablePropertyPartOfClass()
        {
            MockProperty property = new MockProperty("IsRunning");

            property.DeclaringType = c;
            property.IsOverridable = true;
            returnType.Properties.Add(property);

            IProperty[] properties = OverrideCompletionDataProvider.GetOverridableProperties(c);

            AssertArePropertiesEqual(expectedProperties, properties);
        }
示例#6
0
 public void NullArgument()
 {
     OverrideCompletionDataProvider.GetOverridableMethods(null);
 }
示例#7
0
 public void NullArgument()
 {
     OverrideCompletionDataProvider.GetOverridableProperties(null);
 }