Example #1
0
        public void TautologyTest(bool?input)
        {
            // Arrange
            var group = new ValueConverterGroup();

            group.Converters.Add(new InverseBooleanConverter());
            group.Converters.Add(new InverseBooleanConverter());

            // Act
            var result     = group.Convert(input, typeof(bool), null, CultureInfo.CurrentCulture);
            var resultBack = group.ConvertBack(result, typeof(bool), null, CultureInfo.CurrentCulture);

            // Assert
            Assert.AreEqual(input, result);
            Assert.AreEqual(input, resultBack);
        }
 private void SetProperCenter()
 {
     if (!User_CenterChanged.HasValue)
     {
         return;
     }
     if (User_CenterChanged.Value)
     {
         Center = (LatLon)CenterConverter.ConvertBack(MainMap.Center, typeof(LatLon), null, null);
     }
     else
     {
         MainMap.Center = (Geopoint)CenterConverter.Convert(Center, typeof(Geopoint), null, null);
     }
     User_CenterChanged = null;
 }