public ToMethodBinding(InvokeOnChangeAttribute bindingAttribute, IUUTBindingObject source, IUUTBindingObject resultObject, ResultAttribute resultAttribute)
 {
     BindingAttribute = bindingAttribute;
     Source           = source;
     ResultObject     = resultObject;
     ResultAttribute  = resultAttribute;
 }
        private object SetRandomValue(IUUTBindingObject symbol, Type converterType = null)
        {
            var value = GetRandomObjectOfType(symbol.BindingValueType);

            symbol.BindingValue = value;

            return(value);
        }
        private object SetAndAssert(IUUTBindingObject source, IUUTBindingObject target, Type converterType = null)
        {
            var actual = SetRandomValue(source, converterType);

            AssertValue(target, actual, converterType);

            return(actual);
        }
        private void AssertValue(IUUTBindingObject symbol, object expected, Type converterType = null)
        {
            if (expected.GetType() != symbol.BindingValueType)
            {
                expected = Convert(converterType, expected);
            }

            var actual = symbol.BindingValue;

            Assert.That(actual, Is.EqualTo(expected));
        }
Exemple #5
0
        private static void AssertSetCounter(IUUTBindingObject symbol, int expectedCount)
        {
            var sourceSetCounter = symbol.GetValue("_textSetCounter");

            Assert.That(sourceSetCounter, Is.EqualTo(expectedCount));
        }
        private static void AssertCustomSymbol(IUUTBindingObject binding, int expected)
        {
            var value = binding.GetValue("_sample");

            Assert.That(value, Is.EqualTo(expected));
        }
Exemple #7
0
 internal PropertyBinding(Arguments arguments)
 {
     _arguments = arguments;
     Target     = new UUTBindingObject(_arguments.TargetProperty, _arguments.Target);
     Source     = new UUTBindingObject(_arguments.SourceProperty, _arguments.Source);
 }