示例#1
0
        public void EnsureRunInitializesWhenRequired()
        {
            var args   = string.Empty;
            var runned = new ConsoleApplicationManagerGeneric <ApplicationWithArguments>().Run(args);

            runned.Args.Should().BeSameAs(args);
            runned.TestParameters.Should().NotBeNull();

            runned.Mock.Verify(x => x.Run(), Times.Once);
        }
        private ConsoleApplicationManagerGeneric <T> CreateApplicationManager()
        {
            if (createApplication == null)
            {
                createApplication = () => new DefaultFactory().CreateInstance <T>();
            }

            var applicationManager = new ConsoleApplicationManagerGeneric <T>(createApplication)
            {
                WindowTitle = WindowTitle, WindowHeight = WindowHeight, WindowWidth = WindowWidth
            };

            return(applicationManager);
        }
示例#3
0
        public void EnsureRunIsCalledOnRunable()
        {
            var runned = new ConsoleApplicationManagerGeneric <Runable>().Run(new string[0]);

            runned.Mock.Verify(x => x.Run(), Times.Once);
        }