public void NoParameters()
        {
            var vm = new ViewModel();

            var binding = new MethodBindingExtension(vm, nameof(ViewModel.NoParameters));

            TestHelper.RunMethodBinding(null, binding);

            vm.Executed.ShouldBe(true);
            TraceMessages.ShouldBeEmpty();
        }
        public void IntParameterAsXamlString()
        {
            var vm = new ViewModel();

            var binding = new MethodBindingExtension(vm, nameof(ViewModel.IntParam), "5");

            TestHelper.RunMethodBinding(null, binding);

            vm.Executed.ShouldBe(true);
            vm.ParamType.ShouldBe(typeof(int));
            TraceMessages.ShouldBeEmpty();
        }
        public void OverloadedIntStringAsInt()
        {
            var vm = new ViewModel();

            var binding = new MethodBindingExtension(vm, nameof(ViewModel.OverloadedIntString), 5);

            TestHelper.RunMethodBinding(null, binding);

            vm.Executed.ShouldBe(true);
            vm.ParamType.ShouldBe(typeof(int));
            TraceMessages.ShouldBeEmpty();
        }
        public void OverloadedNullableIntDoubleAsNull()
        {
            var vm = new ViewModel();

            var binding = new MethodBindingExtension(vm, nameof(ViewModel.OverloadedNullableIntDouble), null);

            TestHelper.RunMethodBinding(null, binding);

            vm.Executed.ShouldBe(true);
            vm.ParamType.ShouldBe(typeof(int?));
            TraceMessages.ShouldBeEmpty();
        }
        public void NullableIntParameterAsNullExtension()
        {
            var vm = new ViewModel();

            var binding = new MethodBindingExtension(nameof(ViewModel.NullableIntParam), new NullExtension());

            TestHelper.RunMethodBinding(vm, binding);

            vm.Executed.ShouldBe(true);
            vm.ParamType.ShouldBe(typeof(int?));
            TraceMessages.ShouldBeEmpty();
        }