public void WhenAnyValueIntTest() { var obj = new MvxReactiveViewEx(); var list = obj.WhenAnyValue(vm => vm.IntFody) .CreateCollection(ImmediateScheduler.Instance); Assert.True(list.Count == 1, "Should be 1"); obj.IntFody = 1; Assert.True(list.Count == 2, "Should be 2"); obj.IntFody = 2; Assert.True(list.Count == 3, "Should be 3"); }
public void SupressNotificationTest() { var obj = new MvxReactiveViewEx(); var list = obj.WhenAnyValue(vm => vm.TextWithoutFody) .CreateCollection(ImmediateScheduler.Instance); Assert.True(list.Count == 1, "Should be 1"); obj.TextWithoutFody = "abc"; using (obj.SuppressChangeNotifications()) { obj.TextWithoutFody = ""; } Assert.True(list.Count == 1, "Should be 1"); obj.TextWithoutFody = "abc"; Assert.True(list.Count == 2, "Should be 1"); }