public void Create() { var method = this.GetType().GetMethod(nameof(Create)); var requires = RequiresExplicitInterfaceImplementation.Yes; var result = new MockableResult<MethodBase>(method, requires); Assert.AreEqual(method, result.Value, nameof(result.Value)); Assert.AreEqual(requires, result.RequiresExplicitInterfaceImplementation, nameof(result.RequiresExplicitInterfaceImplementation)); }
public void Create() { var method = this.GetType().GetMethod(nameof(Create)) !; var requires = RequiresExplicitInterfaceImplementation.Yes; var result = new MockableResult <MethodBase>(method, requires); Assert.That(result.Value, Is.EqualTo(method), nameof(result.Value)); Assert.That(result.RequiresExplicitInterfaceImplementation, Is.EqualTo(requires), nameof(result.RequiresExplicitInterfaceImplementation)); }
internal MethodInformation Build(MockableResult<MethodInfo> method) { var baseMethod = method.Value; var description = baseMethod.GetMethodDescription(this.Namespaces); var descriptionWithOverride = baseMethod.GetMethodDescription( this.Namespaces, true, method.RequiresExplicitInterfaceImplementation); var containsDelegateConditions = baseMethod.ContainsDelegateConditions(); var delegateCast = !containsDelegateConditions ? baseMethod.GetDelegateCast() : this.GetDelegateCast(baseMethod); return new MethodInformation(containsDelegateConditions, delegateCast, description, descriptionWithOverride); }