Exemple #1
0
        public void ApplyEditOnChildThenRoot()
        {
            UnitTestContext context = GetContext();
            Person          p       = new Person();

            p.Addresses = new AddressList();
            Address a = new Address();

            p.Addresses.Add(a);

            p.BeginEdit();
            a.ApplyEdit();
            context.Assert.Try(p.ApplyEdit);
            context.Complete();
        }
Exemple #2
0
        public void ApplyChildAfterRootUndo()
        {
            UnitTestContext context = GetContext();
            Person          p       = new Person();

            p.Addresses = new AddressList();
            Address a = new Address();

            p.Addresses.Add(a);

            p.BeginEdit();
            p.CancelEdit();
            a.ApplyEdit();
            context.Assert.Success();
            context.Complete();
        }
Exemple #3
0
    public void ApplyEditOnChildThenRoot()
    {
      UnitTestContext context = GetContext();
      Person p = new Person();
      p.Addresses = new AddressList();
      Address a = new Address();
      p.Addresses.Add(a);

      p.BeginEdit();
      a.ApplyEdit();
      context.Assert.Try( p.ApplyEdit );
      context.Complete();
    }
Exemple #4
0
    public void ApplyChildAfterRootUndo()
    {
      UnitTestContext context = GetContext();
      Person p = new Person();
      p.Addresses = new AddressList();
      Address a = new Address();
      p.Addresses.Add(a);

      p.BeginEdit();
      p.CancelEdit();
      a.ApplyEdit();
      context.Assert.Success();
      context.Complete();
    }