Пример #1
0
        public void VerifyConnectedProperties()
        {
            var target = Target;
            var model  = target.Current;


            ConnectedPropertiesAssert.VerifyIdenticalConnectedProperties(model, nameof(model.ShowSearchBox), target, nameof(target.IsSearchBoxVisible), true, false);

            ConnectedPropertiesAssert.VerifyIdenticalConnectedProperties(model, nameof(model.AllowColorEditing), target, nameof(target.AllowColorEditing), true, false);
            ConnectedPropertiesAssert.VerifyIdenticalConnectedProperties(model, nameof(model.ShowColorPicker), target, nameof(target.ShowColorPicker), true, false);
            ConnectedPropertiesAssert.VerifyIdenticalConnectedProperties(model, nameof(model.ShowColorVisibilityControls), target, nameof(target.ShowColorVisibilityControls), true, false);
            ConnectedPropertiesAssert.VerifyIdenticalConnectedProperties(model, nameof(model.ShowToolBox), target, nameof(target.IsToolBoxVisible), true, false);
            ConnectedPropertiesAssert.VerifyIdenticalConnectedProperties(model, nameof(model.ShowBottomToolBox), target, nameof(target.IsBottomToolBoxVisible), true, false);
            ConnectedPropertiesAssert.VerifyIdenticalConnectedProperties(model, nameof(model.ShowSettingsBox), target, nameof(target.IsSettingsBoxVisible), true, false);
            ConnectedPropertiesAssert.VerifyIdenticalConnectedProperties(model, nameof(model.IsAllVisible), target, nameof(target.IsAllVisible), true, false);
            // ConnectedPropertiesAssert.VerifyIdenticalConnectedProperties(target, nameof(target.IsColorSelecting), view, nameof(view.IsColorSelecting), true, false);

            ConnectedPropertiesAssert.VerifyConnectedProperties(target, nameof(target.Filter), model, nameof(model.Filter),
                                                                true,
                                                                new ValueTuple <object, object>("test string", "test string"),
                                                                //  new ValueTuple<object, object>(null, null),
                                                                //  new ValueTuple<object, object>(string.Empty, string.Empty),
                                                                new ValueTuple <object, object>("\\Items+ddd", "\\Items+ddd"));

            ConnectedPropertiesAssert.VerifyIdenticalConnectedProperties(model, nameof(model.FilterWatermark), target, nameof(target.FilterWaterMark), true,
                                                                         "Find...",
                                                                         "Go and find me...",
                                                                         string.Empty,
                                                                         null);
        }
        public void CorrectlySelectCulture(CultureInfo cultureInfo, string cultureName)
        {
            var target = Target;
            var model  = target.Current;

            target.SelectedCulture = cultureName;

            ConnectedPropertiesAssert.VerifyConnectedProperties(model, nameof(model.SelectedCulture),
                                                                target, nameof(target.SelectedCulture), false, new ValueTuple <object, object>(cultureInfo, cultureName));
        }
Пример #3
0
        public void VerifyValue(double value, string viewValue, int decimalPlaces)
        {
            var target = Target;
            var view   = target.View;

            target.DecimalPlaces = decimalPlaces;

            ConnectedPropertiesAssert.VerifyConnectedProperties(target, nameof(target.Value), view, nameof(view.Value), true,
                                                                new ValueTuple <Number, string>(value, viewValue));
        }