Esempio n. 1
0
    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");
    }
Esempio n. 2
0
        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");
        }
Esempio n. 3
0
    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");
    }