public void TestEnsureInTransaction() { var testObject = new TestInpc(); var reactiveTestObject = new ReactiveInpc <TestInpc>(testObject); // Ensure that we only allow changes inside a transaction Assert.That(() => testObject.TestProperty = 2, Throws.Exception.TypeOf <InvalidOperationException>()); }
public void TestNotifyChanged() { var testObject = new TestInpc(); var reactiveTestObject = new ReactiveInpc <TestInpc>(testObject); ChangedCalled changedCalled = EnsureChangedCalled(reactiveTestObject); Transaction.Start(); testObject.TestProperty = 2; testObject.TestProperty = 3; testObject.TestProperty = 4; CompleteTransactionAndAssertChangedCalled(changedCalled); }