示例#1
0
        public void Aggregate_ArgumentChecking()
        {
            ReactiveAssert.Throws <ArgumentNullException>(() => Observable.Aggregate <int, int>(default(IObservable <int>), 1, (x, y) => x + y));
            ReactiveAssert.Throws <ArgumentNullException>(() => Observable.Aggregate <int, int>(DummyObservable <int> .Instance, 1, default(Func <int, int, int>)));

            ReactiveAssert.Throws <ArgumentNullException>(() => Observable.Aggregate <int>(default(IObservable <int>), (x, y) => x + y));
            ReactiveAssert.Throws <ArgumentNullException>(() => Observable.Aggregate <int>(DummyObservable <int> .Instance, default(Func <int, int, int>)));

            ReactiveAssert.Throws <ArgumentNullException>(() => Observable.Aggregate <int, int, int>(default(IObservable <int>), 1, (x, y) => x + y, x => x));
            ReactiveAssert.Throws <ArgumentNullException>(() => Observable.Aggregate <int, int, int>(DummyObservable <int> .Instance, 1, default(Func <int, int, int>), x => x));
            ReactiveAssert.Throws <ArgumentNullException>(() => Observable.Aggregate <int, int, int>(DummyObservable <int> .Instance, 1, (x, y) => x + y, default(Func <int, int>)));
        }