Example #1
0
        public void CanBeBound_CommandWithoutType_ReturnTrue()
        {
            Type actualType = typeof(ObservableCommand);
            Type targetType = typeof(IObservableCommand);

            bool canBeBound = BindingUtils.CanBeBound(actualType, targetType);

            canBeBound.Should().BeTrue();
        }
Example #2
0
        public void CanBeBound_VariableWithReferenceType_ReturnTrue()
        {
            Type actualType = typeof(ObservableVariable <string>);
            Type targetType = typeof(IReadOnlyObservableVariable <string>);

            bool canBeBound = BindingUtils.CanBeBound(actualType, targetType);

            canBeBound.Should().BeTrue();
        }
Example #3
0
        public void CanBeBound_RawTypeToObservableCollection_ReturnFalse()
        {
            Type actualType = typeof(int);
            Type targetType = typeof(IReadOnlyObservableCollection <int>);

            bool canBeBound = BindingUtils.CanBeBound(actualType, targetType);

            canBeBound.Should().BeFalse();
        }
Example #4
0
        public void CanBeBound_CollectionWithBuiltInValueType_ReturnTrue()
        {
            Type actualType = typeof(ObservableCollection <int>);
            Type targetType = typeof(IReadOnlyObservableCollection <int>);

            bool canBeBound = BindingUtils.CanBeBound(actualType, targetType);

            canBeBound.Should().BeTrue();
        }
Example #5
0
        public void CanBeBound_RawTypeToObservableEvent_ReturnFalse()
        {
            Type actualType = typeof(int);
            Type targetType = typeof(IObservableEvent <int>);

            bool canBeBound = BindingUtils.CanBeBound(actualType, targetType);

            canBeBound.Should().BeFalse();
        }
Example #6
0
        public void CanBeBound_EventWithBuiltInValueType_ReturnTrue()
        {
            Type actualType = typeof(ObservableEvent <int>);
            Type targetType = typeof(IObservableEvent <int>);

            bool canBeBound = BindingUtils.CanBeBound(actualType, targetType);

            canBeBound.Should().BeTrue();
        }