Exemplo n.º 1
0
        static IAssembly GetSingleTypeAssembly()
        {
            var type = new TypeStub("MyType");
            var method = new MethodStub("DoStuff");
            type.GetMethodsHandler = () => new[]{ method };

            return GetAssemblyWithTypes(type);
        }
Exemplo n.º 2
0
        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);
        }