IMethod[] GetOverridableMethods(IClass baseClass) { return(OverrideCompletionDataProvider.GetOverridableMethods(new MockClass("DerivedClass") { BaseType = baseClass.DefaultReturnType })); }
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(); }
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); }
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); }
public void NullArgument() { OverrideCompletionDataProvider.GetOverridableMethods(null); }
public void NullArgument() { OverrideCompletionDataProvider.GetOverridableProperties(null); }