public void Editable006CanEndEditPrivateField() { TestEditable vm = new TestEditable(); vm.SetPrivateField("1"); vm.BeginEdit(); vm.SetPrivateField("2"); vm.EndEdit(); Assert.Equal("2", vm.GetPrivateField()); }
public void Editable007CanEndEditPublicListProperty() { TestEditable vm = new TestEditable(); vm.TestPublicListPropery.Add("1"); vm.BeginEdit(); vm.TestPublicListPropery.Add("2"); vm.EndEdit(); Assert.Equal(2, vm.TestPublicListPropery.Count); Assert.Equal("1", vm.TestPublicListPropery[0]); Assert.Equal("2", vm.TestPublicListPropery[1]); }
public void Editable005CanEndEditPublicProperty() { TestEditable vm = new TestEditable { TestPublicPropery = "1" }; vm.BeginEdit(); vm.TestPublicPropery = "2"; vm.EndEdit(); Assert.Equal("2", vm.TestPublicPropery); }
public void Editable008CanEndEditPublicObservableProperty() { TestEditable vm = new TestEditable(); vm.TestPublicObservableCollectionPropery.Add("1"); vm.BeginEdit(); vm.TestPublicObservableCollectionPropery.Add("2"); vm.EndEdit(); Assert.Equal(2, vm.TestPublicObservableCollectionPropery.Count); Assert.Equal("1", vm.TestPublicObservableCollectionPropery[0]); Assert.Equal("2", vm.TestPublicObservableCollectionPropery[1]); }