public void TestSinkChain() { var sink = new SinkChain(); var outerCounter = 0; Assert.AreEqual(false, sink.OuterSink); Assert.AreEqual(true, sink.InnerSink); ObservableUtility.FromProperty(() => sink.OuterSink).Skip(1).Subscribe(value => outerCounter++); sink.Source = true; Assert.AreEqual(true, sink.OuterSink); Assert.AreEqual(false, sink.InnerSink); Assert.AreEqual(1, outerCounter); }
public void TestSinkChain() { var sink = new SinkChain(); var outerCounter = 0; Assert.AreEqual(false, sink.OuterSink); Assert.AreEqual(true, sink.InnerSink); sink.OuterSinkReactive.Skip(1).Subscribe(value => ReactiveManagerTest.Const(value, () => outerCounter++)); Assert.AreEqual(0, outerCounter); sink.Source = true; Assert.AreEqual(true, sink.OuterSink); Assert.AreEqual(false, sink.InnerSink); Assert.AreEqual(1, outerCounter); }