Ejemplo n.º 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();
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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();
        }