コード例 #1
0
ファイル: Utility.cs プロジェクト: aidmsu/fixie
        public static IEnumerable <string> Run <TSampleTestClass>(Discovery discovery, Execution execution)
        {
            var listener = new StubListener();

            RunTypes(listener, discovery, execution, typeof(TSampleTestClass));
            return(listener.Entries);
        }
コード例 #2
0
        public static void ShouldHaveEntries(this StubListener actual, params string[] expected)
        {
            //Type.GetMethods(...) makes no guarantees about the order of the items returned,
            //so test execution order is not guaranteed, although in practice it is predictable.

            actual.Entries.OrderBy(x => x)
            .ShouldEqual(expected.OrderBy(x => x).ToArray());
        }
コード例 #3
0
ファイル: LifecycleTests.cs プロジェクト: mslot/fixie
        Output Run <TExecution>(Type testClass) where TExecution : Execution, new()
        {
            var listener  = new StubListener();
            var execution = new TExecution();

            using (var console = new RedirectedConsole())
            {
                Utility.Run(listener, discovery, execution, testClass);

                return(new Output(console.Lines().ToArray(), listener.Entries.ToArray()));
            }
        }