public void DCEditLevels() { DCRoot root = new DCRoot(); root.BeginEdit(); root.Data = 123; root.CancelEdit(); Assert.AreEqual(0, root.Data, "Data should be 0"); root.BeginEdit(); root.Data = 123; root.ApplyEdit(); Assert.AreEqual(123, root.Data, "Data should be 123"); }
public void DCEditLevels() { IDataPortal <DCRoot> dataPortal = _testDIContext.CreateDataPortal <DCRoot>(); DCRoot root = DCRoot.NewDCRoot(dataPortal); root.BeginEdit(); root.Data = 123; root.CancelEdit(); Assert.AreEqual(0, root.Data, "Data should be 0"); root.BeginEdit(); root.Data = 123; root.ApplyEdit(); Assert.AreEqual(123, root.Data, "Data should be 123"); }
public void DCEditLevels() { System.Configuration.ConfigurationManager.AppSettings["CslaSerializationFormatter"] = "NetDataContractSerializer"; Assert.AreEqual( Csla.ApplicationContext.SerializationFormatters.NetDataContractSerializer, Csla.ApplicationContext.SerializationFormatter, "Formatter should be NetDataContractSerializer"); DCRoot root = new DCRoot(); root.BeginEdit(); root.Data = 123; root.CancelEdit(); Assert.AreEqual(0, root.Data, "Data should be 0"); root.BeginEdit(); root.Data = 123; root.ApplyEdit(); Assert.AreEqual(123, root.Data, "Data should be 123"); }