Ejemplo n.º 1
0
        public Task <Result> Run(string testName)
        {
            return(Task.Run(() =>
            {
                var resultListener = new ResultListener();
                var provider = new StatefulServiceProviderListener <TService>(statefulService);
                var eventSourceTestListener = new EventSourceTestListener();
                var compositeListener = new CompositeListener(provider, resultListener, eventSourceTestListener);

                var fullNameFilter = new FullNameFilter(testName);
                runner.Run(compositeListener, fullNameFilter);

                return resultListener.Result;
            }));
        }
Ejemplo n.º 2
0
        public Task <Result> Run(string testName, CancellationToken cancellationToken = default) =>
        Task.Run(
            () =>
        {
            var resultListener          = new ResultListener();
            var provider                = new StatefulServiceProviderListener <TService>(statefulService);
            var eventSourceTestListener = new EventSourceTestListener();
            var compositeListener       = new CompositeListener(provider, resultListener, eventSourceTestListener);

            var fullNameFilter = new FullNameFilter(testName);
            runner.Run(compositeListener, fullNameFilter);

            return(resultListener.Result);
        },
            CancellationToken.None);