Example #1
0
        public void RoverDriverTestFor33E()
        {
            RoverDriver _driver = new RoverDriver(_model);
            List <RoverLocationModel> roverLocations = _driver.Start();
            var    result        = roverLocations[1];
            string resultString  = $"{ result.Apsis}{ result.Ordinate}{ result.Orientation}";
            string successString = "51E";

            Assert.AreEqual(successString, resultString);
        }
Example #2
0
        static void Main(string[] args)
        {
            Console.WriteLine("-----------------------------");
            Console.WriteLine("Welcome World Of The Rovers !");
            Console.WriteLine("-----------------------------");

            ProcessModel _model = CreateProcessModel();

            Console.WriteLine("*****************************");
            Console.WriteLine("Let's start. ");

            RoverDriver _driver = new RoverDriver(_model);
            List <RoverLocationModel> roverLocations = _driver.Start();

            roverLocations.ForEach(x =>
            {
                Console.WriteLine("**********************************");
                Console.WriteLine($"X :{x.Apsis} Y:{x.Ordinate} Orientation : {x.Orientation}");
                Console.WriteLine("----------------------------------");
            });
        }