Example #1
0
        public void Run()
        {
            var contexts = new ContextCollection();

            try
            {
                contexts = builder.Contexts();

                contexts.Do(c => c.Run());

                new ConsoleFormatter().Write(contexts);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
Example #2
0
        public void Run()
        {
            var contexts = new ContextCollection();

            try
            {
                contexts = builder.Contexts();

                contexts.Build();

                contexts.Run();

                formatter.Write(contexts);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
Example #3
0
        public Context(string name = "", string tags = null, bool isPending = false, Conventions conventions = null)
        {
            Name           = name.Replace("_", " ");
            Tags           = Domain.Tags.ParseTags(tags);
            this.isPending = isPending;

            Examples = new List <ExampleBase>();
            Contexts = new ContextCollection();

            if (conventions == null)
            {
                conventions = new DefaultConventions().Initialize();
            }

            runnables = new List <RunnableExample>();

            BeforeAllChain = new BeforeAllChain(this, conventions);
            BeforeChain    = new BeforeChain(this, conventions);
            ActChain       = new ActChain(this, conventions);
            AfterChain     = new AfterChain(this, conventions);
            AfterAllChain  = new AfterAllChain(this, conventions);
        }