示例#1
0
        public void setup()
        {
            parentContext = new ClassContext(typeof(parent_act));

            childContext = new ClassContext(typeof(child_act));

            parentContext.AddContext(childContext);

            instance = new child_act();

            parentContext.Build();
        }
示例#2
0
        public void setup()
        {
            conventions = new DefaultConventions();

            conventions.Initialize();

            parentContext = new ClassContext(typeof(parent_before), conventions);

            childContext = new ClassContext(typeof(child_before), conventions);

            parentContext.AddContext(childContext);
        }
示例#3
0
        public void setup()
        {
            var specType = typeof(NestedContextThrowsSpecClass);

            classContext = new ClassContext(specType);

            var methodInfo = specType.GetTypeInfo().GetMethod("method_level_context");

            var methodContext = new MethodContext(methodInfo);

            classContext.AddContext(methodContext);
        }
示例#4
0
        protected void Run(Type type, string methodName)
        {
            classContext = new ClassContext(type);

            var method = type.Methods().Single(s => s.Name == methodName);

            methodContext = new MethodContext(method);

            classContext.AddContext(methodContext);

            classContext.Run();
        }