public override void Initialize()
        {
            initializeAgentCalls += 1;

            // Add in some custom Sensors so we can confirm they get sorted as expected.
            sensor1 = new TestSensor("testsensor1");
            sensor2 = new TestSensor("testsensor2");
            sensor2.compressionType = SensorCompressionType.PNG;

            sensors.Add(sensor2);
            sensors.Add(sensor1);
        }
Beispiel #2
0
        public void TestSortCulture(string culture)
        {
            List <ISensor> sensors = new List <ISensor>();
            var            sensor0 = new TestSensor("Apple");
            var            sensor1 = new TestSensor("Æble");

            sensors.Add(sensor0);
            sensors.Add(sensor1);

            var originalCulture = CultureInfo.CurrentCulture;

            CultureInfo.CurrentCulture = new CultureInfo(culture);
            SensorUtils.SortSensors(sensors);
            CultureInfo.CurrentCulture = originalCulture;

            Assert.AreEqual(sensor1, sensors[0]);
            Assert.AreEqual(sensor0, sensors[1]);
        }