Exemplo n.º 1
0
        public void Setup()
        {
            this._elementId           = "Train-150";
            this._existingMissionCode = "M53_Gpp-Cs";
            this._newMissionCode      = "NewMission";
            this._dbSourcePath        = Path.GetDirectoryName(Assembly.GetExecutingAssembly().CodeBase).Replace(@"file:\", string.Empty) + "\\..\\..\\Data\\lmt.db";
            this._dbWorkingPath       = Path.GetDirectoryName(Assembly.GetExecutingAssembly().CodeBase).Replace(@"file:\", string.Empty) + "\\temp\\";

            this._sessionManagerMock         = new Mock <ISessionManagerExtended>();
            this._train2groundClientMock     = new Mock <IT2GManager>();
            this._notificationSenderMock     = new Mock <INotificationSender>();
            this._remoteDataStoreFactoryMock = new Mock <IRemoteDataStoreFactory>();

            MissionService.Initialize(
                this._train2groundClientMock.Object,
                this._sessionManagerMock.Object,
                this._notificationSenderMock.Object,
                this._remoteDataStoreFactoryMock.Object);

            this._missionService = new MissionServiceTested();
            ((MissionServiceTested)this._missionService).PlateformType = CommonConfiguration.PlatformTypeEnum.URBAN;

            if (!Directory.Exists(_dbWorkingPath))
            {
                Directory.CreateDirectory(_dbWorkingPath);
            }
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="NotificationGroundService"/> class.
        /// </summary>
        public NotificationGroundService()
        {
            if (Thread.CurrentThread.Name == null)
            {
                Thread.CurrentThread.Name = "Mission.NotificationGroundService";
            }

            MissionService.Initialize();
        }