Ejemplo n.º 1
0
        public void VerifyProperties()
        {
            var target = Target;
            var model  = target.Current;

            ConnectedPropertiesAssert.VerifyIdenticalConnectedProperties(target, nameof(target.IsToggled), model, nameof(model.IsChecked), true, true, false);
        }
Ejemplo n.º 2
0
        public void CorrectlySetContent(string content)
        {
            var target = Target;
            var model  = target.Current;

            ConnectedPropertiesAssert.VerifyIdenticalConnectedProperties(target, model, nameof(target.Content), true, content);
        }
Ejemplo n.º 3
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);
        }
Ejemplo n.º 4
0
        public void CorrectlyExpand()
        {
            var target = Target;
            var model  = target.Current;

            ConnectedPropertiesAssert.VerifyIdenticalConnectedProperties(target, model, nameof(target.IsExpanded), true, true, false);
        }
Ejemplo n.º 5
0
        public void VerifyState()
        {
            var target = Target;
            var model  = target.Current;

            ConnectedPropertiesAssert.VerifyIdenticalConnectedProperties(target, model, nameof(target.Text), true, "12", "12.3", "0");
        }
        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));
        }
Ejemplo n.º 7
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));
        }
Ejemplo n.º 8
0
        public void VerifyApi()
        {
            var target = Target;
            var model  = target.Current;

            var testContext = CreateTestValidationContext();

            model.ValidationContext = testContext;

            ConnectedPropertiesAssert.VerifyIdenticalConnectedProperties(target, nameof(target.IsFilterVisible),
                                                                         model, nameof(model.ShowFilterBox), true,
                                                                         true, false);

            ValidationTreeAssert.Match(target, testContext);
        }
Ejemplo n.º 9
0
        public void VerifyApi()
        {
            var target = Target;
            var model  = target.Current;

            //ConnectedPropertiesAssert.VerifyConnectedProperties(model, nameof(model.Category),
            //    target, nameof(target.Category), true,
            //    new ValueTuple<string, string>("Debug", "Debug"),
            //    new ValueTuple<string, string>("WrongData!", string.Empty),
            //    new ValueTuple<string, string>("Warning", "Warning"),
            //    new ValueTuple<string, string>("Error", "Error"));

            ConnectedPropertiesAssert.VerifyIdenticalConnectedProperties(target, nameof(target.IsToggled),
                                                                         model, nameof(model.IsChecked), true, false, true);

            ConnectedPropertiesAssert.VerifyIdenticalConnectedProperties(target, nameof(target.EntryCount),
                                                                         model, nameof(model.EntryCount), true, 1, 20);
        }
Ejemplo n.º 10
0
        public void VerifyApi()
        {
            var target = Target;
            var model  = target.Current;

            ConnectedPropertiesAssert.VerifyIdenticalConnectedProperties(target, model, nameof(target.Minimum), true,
                                                                         -100d, 200, 0.1, 0);

            model.Minimum = -1000;

            ConnectedPropertiesAssert.VerifyIdenticalConnectedProperties(target, model, nameof(target.Maximum), true,
                                                                         -100d, 200, 0.1, 0);

            ConnectedPropertiesAssert.VerifyIdenticalConnectedProperties(target, model, nameof(target.LowerValue), true,
                                                                         0.2d, 0.1, 1, 0);

            ConnectedPropertiesAssert.VerifyIdenticalConnectedProperties(target, model, nameof(target.UpperValue), true,
                                                                         0.2d, 0.1, 1, 0);
        }