public void TestSet()
        {
            var           reactiveVar   = new ReactiveVar <int>(1);
            ChangedCalled changedCalled = EnsureChangedCalled(reactiveVar);

            Transaction.Start();
            reactiveVar.Set(2);
            changedCalled.AssertNotCalled();

            Transaction.End();
            changedCalled.AssertCalled();

            Assert.AreEqual(2, reactiveVar.Value);
        }
Esempio n. 2
0
 protected static void CompleteTransactionAndAssertChangedCalled(ChangedCalled changedCalled)
 {
     changedCalled.AssertNotCalled();
     Transaction.End();
     changedCalled.AssertCalled();
 }