Example #1
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]);
        }