示例#1
0
 public void From_Take_Exact()
 {
     ObservableSource.FromArray(1, 2, 3, 4, 5)
     .Take(5)
     .Test()
     .AssertResult(1, 2, 3, 4, 5);
 }
示例#2
0
 public void From_Take_Zero()
 {
     ObservableSource.FromArray(1, 2, 3, 4, 5)
     .Take(0)
     .Test()
     .AssertResult();
 }
示例#3
0
 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);
        }
示例#6
0
 public void From_Single()
 {
     ObservableSource.FromArray(1)
     .Test()
     .AssertResult(1);
 }
示例#7
0
 public void From_Empty()
 {
     ObservableSource.FromArray <int>()
     .Test()
     .AssertResult();
 }
示例#8
0
 public void From_Basic()
 {
     ObservableSource.FromArray(1, 2, 3, 4, 5)
     .Test()
     .AssertResult(1, 2, 3, 4, 5);
 }