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> >()); }
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); }
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); }
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>>()); }