コード例 #1
0
        public void DecorateValueFactory_ShouldDecorateFactory(
            Func <object, IObservable <object> > observable,
            IObservable <object> expected,
            TestSchedulers schedulers)
        {
            //arrange
            var sut = new ObservableMvvmCommand <object, object>(observable, schedulers, schedulers, "name", new AlwaysTrueCanExecuteStrategy <object>());

            //act
            sut.DecorateValueFactory((_, __) => expected);
            var actual = sut.Factory(new object());

            //assert
            actual.Should().Be(expected);
        }
コード例 #2
0
 public void DecorateDoFactory_VerifyGuardClause(
     ObservableMvvmCommand <object, object> sut,
     GuardClauseAssertion assertion)
 {
     assertion.Verify(() => sut.DecorateValueFactory(null));
 }
コード例 #3
0
		public void DecorateDoFactory_VerifyGuardClause(
			ObservableMvvmCommand<object, object> sut,
			GuardClauseAssertion assertion)
		{
			assertion.Verify(() => sut.DecorateValueFactory(null));
		}
コード例 #4
0
		public void DecorateValueFactory_ShouldDecorateFactory(
			Func<object, IObservable<object>> observable,
			IObservable<object> expected,
			TestSchedulers schedulers)
		{
			//arrange
			var sut = new ObservableMvvmCommand<object, object>(observable, schedulers, schedulers, "name", new AlwaysTrueCanExecuteStrategy<object>());

			//act
			sut.DecorateValueFactory((_, __) => expected);
			var actual = sut.Factory(new object());

			//assert
			actual.Should().Be(expected);
		}