コード例 #1
0
 public void Start(IRemoteController remoteController)
 {
     _agent = new StorytellerAgent(_project.Port, _system);
     _agent.Receive(new StartProject {
         Project = _project
     });
 }
コード例 #2
0
 public static void Main(string[] args)
 {
     // GrammarSystem is a custom ISystem
     // that "knows" how to bootstrap and
     // gracefully shut down the system under test
     StorytellerAgent.Run(args, new GrammarSystem());
 }
コード例 #3
0
        public static void Run <T>(string[] args) where T : class
        {
            var system = new AspNetCoreSystem();

            system.UseStartup <T>();

            StorytellerAgent.Run(args, system);
        }
コード例 #4
0
        public void Start(Project project)
        {
            if (_running != null)
            {
                Console.WriteLine($"AGENT: Trying to start specification runner for {_running.GetType().Name} at {project.ProjectPath} and port {project.Port}");
            }

            Project.CurrentProject = project;


            _project = project;

            Type systemType = null;



            try
            {
                if (_running == null)
                {
                    buildRunningSystem();
                }

                if (project.Mode == EngineMode.ExportOnly)
                {
                    EventAggregator.SendMessage(_running.RecycledMessage);
                    return;
                }


                _engine = project.Mode == EngineMode.Interactive
                    ? buildUserInterfaceEngine()
                    : buildBatchedEngine(project.TracingStyle);


                _engine.Start(project.StopConditions);


                ConsoleWriter.Write("AGENT: Specification running engine ready at " + project.ProjectPath);
            }
            catch (Exception e)
            {
                StorytellerAgent.LogFailure(e);

                ConsoleWriter.Write(ConsoleColor.Red, e.ToString());

                var message = new SystemRecycled
                {
                    error   = e.ToString(),
                    success = false,
                };

                EventAggregator.SendMessage(message);
            }
        }
コード例 #5
0
        private static int Main(string[] args)
        {
            // SAMPLE: adding-external-node
            var host = new JasperStorytellerHost <MyJasperAppRegistry>();

            host.AddNode(new OtherApp());

            return(StorytellerAgent.Run(args, host));
            // ENDSAMPLE

            /*
             * // SAMPLE: bootstrapping-storyteller-with-Jasper
             * JasperStorytellerHost.Run<MyJasperAppRegistry>(args);
             * // ENDSAMPLE
             */
        }
コード例 #6
0
        public static void Main(string[] args)
        {
            DateTime time = DateTime.MinValue;

            DateTime.TryParse("anything", out time);
            Console.WriteLine(time);

            DependencyContext.Default.RuntimeLibraries.Each(x =>
            {
                Console.WriteLine($"{x.Name}: {x.Version}");
            });


            // GrammarSystem is a custom ISystem
            // that "knows" how to bootstrap and
            // gracefully shut down the system under test
            StorytellerAgent.Run(args, new GrammarSystem());
        }
コード例 #7
0
        public override bool Execute(StorytellerInput input)
        {
            try
            {
                var running = RunningSystem.Create(input.System);
                if (running.RecycledMessage.success)
                {
                    Console.WriteLine("Able to create the FixtureLibrary");
                }


                Console.WriteLine("System ready.");


                writeFixtures(running);



                Console.WriteLine("Trying the Warmup now...");

                var warmup = running.System.Warmup();

                warmup.Wait(1.Minutes());

                if (warmup.IsCompleted)
                {
                    ConsoleWriter.Write(ConsoleColor.Green, "StorytellerAgent started without any exceptions");
                }

                return(true);
            }
            catch (Exception e)
            {
                StorytellerAgent.LogFailure(e);

                ConsoleWriter.Write(ConsoleColor.Red, "StorytellerAgent startup failed!");
                ConsoleWriter.Write(ConsoleColor.Yellow, e.ToString());

                return(false);
            }
        }
コード例 #8
0
        public void Start(Project project)
        {
            if (_running != null)
            {
                Console.WriteLine($"AGENT: Trying to start specification runner for {_running.GetType().Name} at {project.ProjectPath} and port {project.Port}");
            }

            Project.CurrentProject = project;


            _project = project;


            try
            {
                _engine = buildUserInterfaceEngine();


                _engine.Start(project.StopConditions);


                ConsoleWriter.Write("AGENT: Specification running engine ready at " + project.ProjectPath);
            }
            catch (Exception e)
            {
                StorytellerAgent.LogFailure(e);

                ConsoleWriter.Write(ConsoleColor.Red, e.ToString());

                var message = new SystemRecycled
                {
                    error   = e.ToString(),
                    success = false,
                };

                EventAggregator.SendMessage(message);
            }
        }
コード例 #9
0
 public static void Main(string[] args)
 {
     StorytellerAgent.Run(args, new DatabaseSystem());
 }
コード例 #10
0
 public static void Run <T>(string[] args) where T : JasperHttpRegistry, new()
 {
     StorytellerAgent.Run(args, For <T>());
 }
コード例 #11
0
 public void Main(string[] args)
 {
     // SAMPLE: running-MyJasperStorytellerHarness
     StorytellerAgent.Run(args, new MyJasperStorytellerHarness());
     // ENDSAMPLE
 }
コード例 #12
0
 public static void Main(string[] args)
 {
     StorytellerAgent.Run(args, new MartenSystem());
 }
コード例 #13
0
        // ENDSAMPLE

        public static void Main(string[] args)
        {
            StorytellerAgent.Run(args, new SpecificationSystem());
        }
コード例 #14
0
        public static void Run <T>(string[] args) where T : class
        {
            var system = new AspNetCoreSystem(() => SystemUnderTest.ForStartup <T>());

            StorytellerAgent.Run(args, system);
        }
コード例 #15
0
ファイル: Program.cs プロジェクト: robocode13/Storyteller
 public static int Main(string[] args)
 {
     return(StorytellerAgent.Run <Program>(args));
 }
コード例 #16
0
ファイル: Program.cs プロジェクト: tdawgy/Storyteller
 public static int Main(string[] args)
 {
     // If you do not need a custom ISystem
     return(StorytellerAgent.Run(args));
 }
コード例 #17
0
 public static void Main(string[] args)
 {
     StorytellerAgent.Run(args);
 }
コード例 #18
0
ファイル: Program.cs プロジェクト: tdawgy/Storyteller
 public static void Main(string[] args)
 {
     StorytellerAgent.Run(args, new ReduxSampleSystem());
 }
コード例 #19
0
 public static void Main(string[] args)
 {
     StorytellerAgent.Run(args, new SeleniumSystem());
 }
コード例 #20
0
ファイル: EngineAgent.cs プロジェクト: vgrigoriu/Storyteller
        public void Start(Project project)
        {
            if (_system != null)
            {
                Console.WriteLine($"AGENT: Trying to start specification runner for {_system.GetType().Name} at {project.ProjectPath} and port {project.Port}");
            }

            Project.CurrentProject = project;


            _project = project;

            Type systemType = null;

            try
            {
                if (_system == null)
                {
                    systemType = _project.DetermineSystemType();
                    _system    = Activator.CreateInstance(systemType).As <ISystem>();
                    _disposables.Add(_system);
                }

                if (project.Mode == EngineMode.ExportOnly)
                {
                    var recycled = _system.Initialize(lib => { });
                    EventAggregator.SendMessage(recycled);
                    return;
                }


                _engine = project.Mode == EngineMode.Interactive
                    ? buildUserInterfaceEngine()
                    : buildBatchedEngine(project.TracingStyle);


                _engine.Start(project.StopConditions);


                ConsoleWriter.Write("AGENT: Specification running engine ready at " + project.ProjectPath);
            }
            catch (Exception e)
            {
                StorytellerAgent.LogFailure(e);

                ConsoleWriter.Write(ConsoleColor.Red, e.ToString());

                var message = new SystemRecycled
                {
                    error   = e.ToString(),
                    success = false,
                };

                if (systemType != null)
                {
                    message.system_name = systemType.AssemblyQualifiedName;
                }

                EventAggregator.SendMessage(message);
            }
        }
コード例 #21
0
 private static int Main(string[] args)
 {
     return(StorytellerAgent.Run(args));
 }
コード例 #22
0
 public void Start(IEngineController remoteController)
 {
     _agent = new StorytellerAgent(_project.Port, _system);
     _agent.Receive(new StartProject {Project = _project});
 }
コード例 #23
0
 public static void Main(string[] args)
 {
     StorytellerAgent.Run(args, new HelloWorldSystem());
 }
コード例 #24
0
 public static void Run <T>(string[] args) where T : JasperOptions, new()
 {
     StorytellerAgent.Run(args, For <T>());
 }
コード例 #25
0
 public static void Main(string[] args)
 {
     // If you do not need a custom ISystem
     StorytellerAgent.Run(args);
 }
コード例 #26
0
ファイル: Program.cs プロジェクト: pkoronawa/jasper
 public static int Main(string[] args)
 {
     return(StorytellerAgent.Run <SpecSystem>(args));
 }