public static void CheckProperties(BaseStationSettings settings)
        {
            settings.DatabaseFileName = settings.DatabaseFileName.ToUpperInvariant();
            settings.OperatorFlagsFolder = settings.OperatorFlagsFolder.ToUpperInvariant();

            TestUtilities.TestProperty(settings, r => r.Address, "127.0.0.1", "Ab");
            TestUtilities.TestProperty(settings, r => r.AutoReconnectAtStartup, false);
            TestUtilities.TestProperty(settings, r => r.Port, 30003, 65535);
            TestUtilities.TestProperty(settings, r => r.ComPort, null, "ABC");
            TestUtilities.TestProperty(settings, r => r.BaudRate, 115200, 2400);
            TestUtilities.TestProperty(settings, r => r.DataBits, 8, 7);
            TestUtilities.TestProperty(settings, r => r.StopBits, StopBits.One, StopBits.None);
            TestUtilities.TestProperty(settings, r => r.Parity, Parity.None, Parity.Odd);
            TestUtilities.TestProperty(settings, r => r.Handshake, Handshake.None, Handshake.XOnXOff);
            TestUtilities.TestProperty(settings, r => r.StartupText, "#43-02\\r", "anything");
            TestUtilities.TestProperty(settings, r => r.ShutdownText, "#43-00\\r", "anything");
            TestUtilities.TestProperty(settings, r => r.ConnectionType, ConnectionType.TCP, ConnectionType.COM);
            TestUtilities.TestProperty(settings, r => r.DataSource, DataSource.Port30003, DataSource.Sbs3);
            TestUtilities.TestProperty(settings, r => r.DatabaseFileName, Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86), @"Kinetic\BaseStation\BaseStation.sqb").ToUpperInvariant(), "Zz", true);
            TestUtilities.TestProperty(settings, r => r.OperatorFlagsFolder, Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86), @"Kinetic\BaseStation\OperatorFlags").ToUpperInvariant(), "Zz", true);
            TestUtilities.TestProperty(settings, r => r.SilhouettesFolder, null, "Ab");
            TestUtilities.TestProperty(settings, r => r.OutlinesFolder, Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86), @"Kinetic\BaseStation\Outlines"), "Ab", true);
            TestUtilities.TestProperty(settings, r => r.PicturesFolder, null, "Bb");
            TestUtilities.TestProperty(settings, r => r.DisplayTimeoutSeconds, 30, 300);
            TestUtilities.TestProperty(settings, r => r.IgnoreBadMessages, true);
            TestUtilities.TestProperty(settings, r => r.TrackingTimeoutSeconds, 600, 3600);
        }
Пример #2
0
 /// <summary>
 /// Creates a new object.
 /// </summary>
 public Configuration()
 {
     BaseStationSettings    = new BaseStationSettings();
     FlightRouteSettings    = new FlightRouteSettings();
     WebServerSettings      = new WebServerSettings();
     GoogleMapSettings      = new GoogleMapSettings();
     VersionCheckSettings   = new VersionCheckSettings();
     InternetClientSettings = new InternetClientSettings();
     AudioSettings          = new AudioSettings();
     RawDecodingSettings    = new RawDecodingSettings();
 }
 /// <summary>
 /// Creates a new object.
 /// </summary>
 public Configuration()
 {
     BaseStationSettings = new BaseStationSettings();
     FlightRouteSettings = new FlightRouteSettings();
     WebServerSettings = new WebServerSettings();
     GoogleMapSettings = new GoogleMapSettings();
     VersionCheckSettings = new VersionCheckSettings();
     InternetClientSettings = new InternetClientSettings();
     AudioSettings = new AudioSettings();
     RawDecodingSettings = new RawDecodingSettings();
 }
Пример #4
0
        /// <summary>
        /// Creates a new object.
        /// </summary>
        public Configuration()
        {
            BaseStationSettings    = new BaseStationSettings();
            FlightRouteSettings    = new FlightRouteSettings();
            WebServerSettings      = new WebServerSettings();
            GoogleMapSettings      = new GoogleMapSettings();
            VersionCheckSettings   = new VersionCheckSettings();
            InternetClientSettings = new InternetClientSettings();
            AudioSettings          = new AudioSettings();
            RawDecodingSettings    = new RawDecodingSettings();
            MonoSettings           = new MonoSettings();

            _MergedFeeds.ListChanged         += MergedFeeds_ListChanged;
            _RebroadcastSettings.ListChanged += RebroadcastSettings_ListChanged;
            _ReceiverLocations.ListChanged   += ReceiverLocations_ListChanged;
            _Receivers.ListChanged           += Receivers_ListChanged;
        }
        public void BaseStationSettings_Constructor_Initialises_To_Known_State_Under_Mono()
        {
            _RuntimeEnvironment.Setup(r => r.IsMono).Returns(true);

            _Implementation = new BaseStationSettings();

            TestUtilities.TestProperty(_Implementation, r => r.Address, "127.0.0.1", "Ab");
            TestUtilities.TestProperty(_Implementation, r => r.ConnectionType, ConnectionType.TCP, ConnectionType.COM);
            TestUtilities.TestProperty(_Implementation, r => r.Port, 30003, 65535);
            TestUtilities.TestProperty(_Implementation, r => r.DataSource, DataSource.Port30003, DataSource.Sbs3);
            TestUtilities.TestProperty(_Implementation, r => r.DatabaseFileName, null, "Zz", true);
            TestUtilities.TestProperty(_Implementation, r => r.OperatorFlagsFolder, null, "Zz", true);
            TestUtilities.TestProperty(_Implementation, r => r.SilhouettesFolder, null, "Ab");
            TestUtilities.TestProperty(_Implementation, r => r.OutlinesFolder, null, "Ab", true);
            TestUtilities.TestProperty(_Implementation, r => r.PicturesFolder, null, "Bb");
            TestUtilities.TestProperty(_Implementation, r => r.DisplayTimeoutSeconds, 30, 300);
            TestUtilities.TestProperty(_Implementation, r => r.TrackingTimeoutSeconds, 600, 3600);
            TestUtilities.TestProperty(_Implementation, r => r.IgnoreBadMessages, true);
        }
 public void TestInitialise()
 {
     _OriginalFactory = Factory.TakeSnapshot();
     _RuntimeEnvironment = TestUtilities.CreateMockSingleton<IRuntimeEnvironment>();
     _Implementation = new BaseStationSettings();
 }