コード例 #1
0
        public AutoMapperTest()
        {
            Setup();
            _mockedService = new Mock <MarsRoverService>(UnitySetup.Resolve <IApplicationSettings>())
            {
                CallBase = true
            };

            _roverInput = new RoverImageInputDto()
            {
                ImageDate = new DateTime(2016, 1, 1)
            };
        }
コード例 #2
0
        public override int Run(string[] remainingArguments)
        {
            try
            {
                var stopWatch = new Stopwatch();
                stopWatch.Start();

                var roverImageArchiver = UnitySetup.Resolve <IRoverImageArchiver>();
                var task = Task.Run(() =>
                                    roverImageArchiver.ArchiveImages(FileLocation));
                task.Wait();
                stopWatch.Stop();
                Log.Information($"Total Elasped Time in sec {stopWatch.Elapsed.TotalSeconds}");
                return((int)task.Result);
            }
            catch (Exception e)
            {
                Log.Error(e, "DownloadRoverImagesCommand.Run");
                return((int)ExitCode.UnknownError);
            }
        }
コード例 #3
0
 public MarsRoverServiceTest()
 {
     Setup();
     _marsRoverService = new MarsRoverService(UnitySetup.Resolve <IApplicationSettings>());
 }