コード例 #1
0
        public void ToViewModel_ShouldSaveViewModel(
            Task <object> source,
            TestSchedulers scheduler)
        {
            //arrange
            IObservableViewModel viewModel = null;
            var sut = new ObservableViewModelBuilderOptions <object>(model => viewModel = model, ct => source, scheduler);

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

            //assert
            actual.Should().Be(viewModel.As <ObservableViewModel <object> >());
        }
コード例 #2
0
		public void ToViewModel_ShouldReturnCorrectValue(
			Task<object> value,
			TestSchedulers scheduler)
		{
			//arrange
			var sut = new ObservableViewModelBuilderOptions<object>(model => { }, ct => value, scheduler);

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

			//assert
			actual.Should().BeOfType<ObservableViewModel<object>>()
				  .And.Match<ObservableViewModel<object>>(model => model.Source(CancellationToken.None) == value);
		}
コード例 #3
0
        public void ToViewModel_ShouldReturnCorrectValue(
            Task <object> value,
            TestSchedulers scheduler)
        {
            //arrange
            var sut = new ObservableViewModelBuilderOptions <object>(model => { }, ct => value, scheduler);

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

            //assert
            actual.Should().BeOfType <ObservableViewModel <object> >()
            .And.Match <ObservableViewModel <object> >(model => model.Source(CancellationToken.None) == value);
        }
コード例 #4
0
		public void ToViewModel_ShouldSaveViewModel(
			Task<object> source,
			TestSchedulers scheduler)
		{
			//arrange
			IObservableViewModel viewModel = null;
			var sut = new ObservableViewModelBuilderOptions<object>(model => viewModel = model, ct => source, scheduler);

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

			//assert
			actual.Should().Be(viewModel.As<ObservableViewModel<object>>());
		}