public void ToCommand_WithCanExecute_ShouldReturnCorrectValue(
            CommandBuilderOptions<object> sut)
        {
            //arrange
	        
            //act
            var actual = sut.CanExecute(() => false).ToCommand();

            //assert
	        actual.As<Command<object>>().CanExecuteStrategy.Should().BeOfType<SingleExecutionCanExecuteStrategy<object>>()
	              .Which.CanExecutePredicate(null).Should().BeFalse();
        }
        public void ToCommand_WithCanExecuteObservable_ShouldReturnCorrectValue(
            CommandBuilderOptions <object> sut,
            IObservable <bool> predicate)
        {
            //arrange

            //act
            var actual = sut.CanExecute(predicate).ToCommand();

            //assert
            actual.As <Command <object> >().CanExecuteStrategy.Should().BeOfType <ObserveCanExecuteStrategy <object> >()
            .Which.CanExecuteObservable.Should().Be(predicate);
        }
        public void ToCommand_WithCanExecuteOfT_ShouldReturnCorrectValue(
            CommandBuilderOptions <object> sut)
        {
            //arrange
            Func <object, bool> predicate = o => true;

            //act
            var actual = sut.CanExecute(predicate).ToCommand();

            //assert
            actual.As <Command <object> >().CanExecuteStrategy.Should().BeOfType <SingleExecutionCanExecuteStrategy <object> >()
            .Which.CanExecutePredicate(null).Should().BeTrue();
        }
        public void ToCommand_ShouldReturnCorrectValue(
            [Frozen] Action <object> action,
            CommandBuilderOptions <object> sut)
        {
            //arrange

            //act
            var actual = sut.ToCommand();

            //assert
            actual.Should().BeOfType <Command <object> >()
            .And.Match <Command <object> >(options => options.Action == action);
        }
        public void CanExecute_WithObservable_ShouldReturnCorrectValue(
            IObservable <bool> observablePredicate,
            CommandBuilderOptions <object> sut)
        {
            //arrange

            //act
            sut.CanExecute(observablePredicate);

            //assert
            sut.ObservablePredicate.Should().Be(observablePredicate);
            sut.CanExecutePredicate.Should().BeNull();
        }
        public void CanExecute_ShouldReturnCorrectValue(
          CommandBuilderOptions<object> sut)
        {
            //arrange
            Func<bool> predicate = () => true;

            //act
            sut.CanExecute(predicate);

            //assert
            sut.CanExecutePredicate(null).Should().BeTrue();
            sut.ObservablePredicate.Should().BeNull();
        }
		public void ToCommand_WithCanExecuteObservable_ShouldReturnCorrectValue(
			CommandBuilderOptions<object> sut,
			IObservable<bool> predicate)
		{
			//arrange

			//act
			var actual = sut.CanExecute(predicate).ToCommand();

			//assert
			actual.As<Command<object>>().CanExecuteStrategy.Should().BeOfType<ObserveCanExecuteStrategy<object>>()
			      .Which.CanExecuteObservable.Should().Be(predicate);
		}
        public void ToCommand_WithCanExecuteOfT_ShouldReturnCorrectValue(
            CommandBuilderOptions<object> sut)
        {
            //arrange
            Func<object, bool> predicate = o => true;

            //act
            var actual = sut.CanExecute(predicate).ToCommand();

            //assert
	        actual.As<Command<object>>().CanExecuteStrategy.Should().BeOfType<SingleExecutionCanExecuteStrategy<object>>()
	              .Which.CanExecutePredicate(null).Should().BeTrue();
        }
        public void ToCommand_ShouldReturnCorrectValue(
            [Frozen] Action<object> action,
            CommandBuilderOptions<object> sut)
        {
            //arrange

            //act
            var actual = sut.ToCommand();

            //assert
            actual.Should().BeOfType<Command<object>>()
                  .And.Match<Command<object>>(options => options.Action == action);
        }
        public void CanExecute_WithObservable_ShouldReturnCorrectValue(
            IObservable<bool> observablePredicate,
            CommandBuilderOptions<object> sut)
        {
            //arrange

            //act
            sut.CanExecute(observablePredicate);

            //assert
            sut.ObservablePredicate.Should().Be(observablePredicate);
            sut.CanExecutePredicate.Should().BeNull();
        }