static IAssembly GetSingleTypeAssembly() { var type = new TypeStub("MyType"); var method = new MethodStub("DoStuff"); type.GetMethodsHandler = () => new[]{ method }; return GetAssemblyWithTypes(type); }
public void Should_remember_current_method() { var handler = new TestHandler(); IMethod activeMethod = null; handler.OnBeginMethod = x => activeMethod = x; var method = new MethodStub("DoStuff"); handler.BeginMethod(method); activeMethod.ShouldBeSameAs(method); }