Exemplo n.º 1
0
        static void Main(string[] args)
        {
            ConsoleWrapper   wrapper          = new ConsoleWrapper();
            ConsoleProcessor consoleProcessor = new ConsoleProcessor(wrapper);

            consoleProcessor.PopulateData();
            consoleProcessor.CheckPoints();
        }
Exemplo n.º 2
0
 public IActionResult ConsoleDB(ConsoleModel gameSystem)
 {
     if (ModelState.IsValid)
     {
         int recordsCreated = ConsoleProcessor.CreateConsole(gameSystem.ConsoleName, gameSystem.Manufacturer, gameSystem.Notes);
         return(RedirectToAction("ConsoleDB"));
     }
     return(View());
 }
        static void Main()
        {
            bool   done       = false;
            int    roverCount = 1;
            string lineReaded;
            int    lineNumberReaded = 0;

            Processor processor = new Processor();

            while (!done)
            {
                lineNumberReaded += 1;
                try
                {
                    switch (lineNumberReaded)
                    {
                    case 1:
                        lineReaded = ConsoleProcessor.ProcessLine("Please Enter the Coordinates of Plateau");
                        processor.ProcessPlateauLine(lineReaded);
                        break;

                    case 2:
                        lineReaded = ConsoleProcessor.ProcessLine($"Please Enter the {roverCount}. Initial Vector Informations");
                        processor.ProcessVectorLine(lineReaded);
                        break;

                    case 3:
                        lineReaded = ConsoleProcessor.ProcessLine($"Please Enter the {roverCount}. Movement Directives");
                        processor.ProcessDirectiveLine(lineReaded);
                        break;

                    case 4:
                        lineReaded = ConsoleProcessor.ProcessLine("Would You Like to Start Process or Continue to Enter? Y/N");
                        processor.ProcessQuestionLine(lineReaded);

                        if (lineReaded == "Y")
                        {
                            processor.ProcessCalculationOfFinalVectors();
                            done = true;
                        }
                        else if (lineReaded == "N")
                        {
                            lineNumberReaded = 1;
                            roverCount      += 1;
                        }
                        break;
                    }
                }
                catch (Exception ex)
                {
                    ConsoleProcessor.WriteError(ex.Message);
                    lineNumberReaded -= 1;
                }
            }

            Console.ReadKey();
        }
        public void ProcessCalculationOfFinalVectors()
        {
            _mars.RoverList = _roverList;
            IPlanetBusiness marsBusiness    = new MarsBusiness();
            List <IVector>  finalVectorList = marsBusiness.GetFinalsVectors(_mars);

            ConsoleProcessor.WriteTestInput(_inputLines);
            ConsoleProcessor.WriteExpectedOutput(finalVectorList, _mars.Plateau);
        }
Exemplo n.º 5
0
        public void Execute_Should_ReturnListOfCustomerModels(string[] value)
        {
            var customers = (ConsoleProcessor.Execute(value)).ToList();

            Assert.Single(customers);

            foreach (var cust in customers)
            {
                Assert.Equal(cust.FirstName, FirstName);
                Assert.Equal(cust.LastName, LastName);
                Assert.Equal(cust.PropertyType, PropertyType);
                Assert.Equal(cust.Project, Project);
                Assert.Equal(cust.StartDate, Date);
                Assert.Equal(cust.Phone, Phone);
            }
        }
Exemplo n.º 6
0
 public ConsoleProcessorTests()
 {
     _processor = new ConsoleProcessor();
 }
Exemplo n.º 7
0
 public UnitTest1()
 {
     //setup
     _consoleWrapper  = new Mock <IConsoleWrapper>();
     consoleProcessor = new ConsoleProcessor(_consoleWrapper.Object);
 }
Exemplo n.º 8
0
        public static void Main(string[] args)
        {
            var processor = new ConsoleProcessor();

            processor.ProcessArgs(args).Wait();
        }