public void From_Take_Exact() { ObservableSource.FromArray(1, 2, 3, 4, 5) .Take(5) .Test() .AssertResult(1, 2, 3, 4, 5); }
public void From_Take_Zero() { ObservableSource.FromArray(1, 2, 3, 4, 5) .Take(0) .Test() .AssertResult(); }
public void From_FusionRejected() { ObservableSource.FromArray(1, 2, 3, 4, 5) .Test(fusionMode: FusionSupport.Async) .AssertFuseable() .AssertFusionMode(FusionSupport.None) .AssertResult(1, 2, 3, 4, 5); }
public void Concat_Basic() { ObservableSource.FromArray( ObservableSource.Just(1), ObservableSource.Just(2), ObservableSource.Just(3), ObservableSource.Just(4), ObservableSource.Just(5) ) .Concat() .Test() .AssertResult(1, 2, 3, 4, 5); }
public void Limited_Dispose() { var subj1 = new PublishSubject <int>(); var subj2 = new PublishSubject <int>(); var to = ObservableSource.FromArray(subj1, subj2).Merge <int>(maxConcurrency: 2).Test(); to.AssertEmpty(); Assert.True(subj1.HasObservers); Assert.True(subj2.HasObservers); to.Dispose(); Assert.False(subj1.HasObservers); Assert.False(subj2.HasObservers); }
public void From_Single() { ObservableSource.FromArray(1) .Test() .AssertResult(1); }
public void From_Empty() { ObservableSource.FromArray <int>() .Test() .AssertResult(); }
public void From_Basic() { ObservableSource.FromArray(1, 2, 3, 4, 5) .Test() .AssertResult(1, 2, 3, 4, 5); }