示例#1
0
 public void ForgetTestObjects()
 {
     ctx = null;
     oneSide1 = oneSide2 = oneSide3 = null;
     nSide1 = nSide2 = null;
     hasSubmitted = false;
 }
示例#2
0
 public override void TearDown()
 {
     obj = null;
     ilvm = null;
     ctx = null;
     base.TearDown();
 }
示例#3
0
 public void ForgetTestObjects()
 {
     ctx          = null;
     oneSide1     = oneSide2 = oneSide3 = null;
     nSide1       = nSide2 = null;
     hasSubmitted = false;
 }
示例#4
0
 public override void SetUp()
 {
     base.SetUp();
     ctx = scope.Resolve<IZetboxContext>();
     ilvm = vmf.CreateViewModel<InstanceListViewModel.Factory>().Invoke(ctx, null, (ObjectClass)NamedObjects.Base.Classes.Zetbox.App.Test.One_to_N_relations_N.Find(ctx), null);
     obj = ctx.Create<One_to_N_relations_N>();
     ctx.SubmitChanges();
 }
示例#5
0
 public virtual void InitTestObjects()
 {
     ctx = GetContext();
     oneSide1 = ctx.Create<One_to_N_relations_One>();
     oneSide2 = ctx.Create<One_to_N_relations_One>();
     oneSide3 = ctx.Create<One_to_N_relations_One>();
     nSide1 = ctx.Create<One_to_N_relations_N>();
     nSide2 = ctx.Create<One_to_N_relations_N>();
 }
示例#6
0
 public virtual void InitTestObjects()
 {
     ctx      = GetContext();
     oneSide1 = ctx.Create <One_to_N_relations_One>();
     oneSide2 = ctx.Create <One_to_N_relations_One>();
     oneSide3 = ctx.Create <One_to_N_relations_One>();
     nSide1   = ctx.Create <One_to_N_relations_N>();
     nSide2   = ctx.Create <One_to_N_relations_N>();
 }
示例#7
0
 protected void SubmitAndReload()
 {
     ctx.SubmitChanges();
     hasSubmitted = true;
     ctx = GetContext();
     oneSide1 = ctx.Find<One_to_N_relations_One>(oneSide1.ID);
     oneSide2 = ctx.Find<One_to_N_relations_One>(oneSide2.ID);
     oneSide3 = ctx.Find<One_to_N_relations_One>(oneSide3.ID);
     nSide1 = ctx.Find<One_to_N_relations_N>(nSide1.ID);
     nSide2 = ctx.Find<One_to_N_relations_N>(nSide2.ID);
 }
示例#8
0
 protected void SubmitAndReload()
 {
     ctx.SubmitChanges();
     hasSubmitted = true;
     ctx          = GetContext();
     oneSide1     = ctx.Find <One_to_N_relations_One>(oneSide1.ID);
     oneSide2     = ctx.Find <One_to_N_relations_One>(oneSide2.ID);
     oneSide3     = ctx.Find <One_to_N_relations_One>(oneSide3.ID);
     nSide1       = ctx.Find <One_to_N_relations_N>(nSide1.ID);
     nSide2       = ctx.Find <One_to_N_relations_N>(nSide2.ID);
 }
示例#9
0
        public override void SetUp()
        {
            base.SetUp();

            ctx = GetContext();

            one = ctx.Create<One_to_N_relations_One>();
            n1 = ctx.Create<One_to_N_relations_N>();
            n2 = ctx.Create<One_to_N_relations_N>();

            one.NSide.Add(n1);
            one.NSide.Add(n2);

            ctx.SubmitChanges();
        }
示例#10
0
        public override void SetUp()
        {
            base.SetUp();

            ctx = GetContext();

            one = ctx.Create <One_to_N_relations_One>();
            n1  = ctx.Create <One_to_N_relations_N>();
            n2  = ctx.Create <One_to_N_relations_N>();

            one.NSide.Add(n1);
            one.NSide.Add(n2);

            ctx.SubmitChanges();
        }
示例#11
0
 public void InitTestObjects()
 {
     ctx            = GetContext();
     oneSide1       = ctx.Create <One_to_N_relations_One>();
     oneSide2       = ctx.Create <One_to_N_relations_One>();
     oneSide3       = ctx.Create <One_to_N_relations_One>();
     nSide1         = ctx.Create <One_to_N_relations_N>();
     nSide1.OneSide = oneSide3;
     nSide2         = ctx.Create <One_to_N_relations_N>();
     nSide2.OneSide = oneSide3;
     ctx.SubmitChanges();
     ctx      = GetContext();
     oneSide1 = ctx.Find <One_to_N_relations_One>(oneSide1.ID);
     oneSide2 = ctx.Find <One_to_N_relations_One>(oneSide2.ID);
     oneSide3 = ctx.Find <One_to_N_relations_One>(oneSide3.ID);
     nSide1   = ctx.Find <One_to_N_relations_N>(nSide1.ID);
     nSide2   = ctx.Find <One_to_N_relations_N>(nSide2.ID);
 }
示例#12
0
 public void InitTestObjects()
 {
     ctx = GetContext();
     oneSide1 = ctx.Create<One_to_N_relations_One>();
     oneSide2 = ctx.Create<One_to_N_relations_One>();
     oneSide3 = ctx.Create<One_to_N_relations_One>();
     nSide1 = ctx.Create<One_to_N_relations_N>();
     nSide1.OneSide = oneSide3;
     nSide2 = ctx.Create<One_to_N_relations_N>();
     nSide2.OneSide = oneSide3;
     ctx.SubmitChanges();
     ctx = GetContext();
     oneSide1 = ctx.Find<One_to_N_relations_One>(oneSide1.ID);
     oneSide2 = ctx.Find<One_to_N_relations_One>(oneSide2.ID);
     oneSide3 = ctx.Find<One_to_N_relations_One>(oneSide3.ID);
     nSide1 = ctx.Find<One_to_N_relations_N>(nSide1.ID);
     nSide2 = ctx.Find<One_to_N_relations_N>(nSide2.ID);
 }
示例#13
0
        public override void SetUp()
        {
            base.SetUp();

            ctx = GetContext();

            one1 = ctx.Create<One_to_N_relations_One>();
            one2 = ctx.Create<One_to_N_relations_One>();
            n1 = ctx.Create<One_to_N_relations_N>();
            n2 = ctx.Create<One_to_N_relations_N>();

            one1.Name = "One1";
            one2.Name = "One2";
            n1.Name = "N1";
            n2.Name = "N2";

            one1.NSide.Add(n1);
            one1.NSide.Add(n2);

            ctx.SubmitChanges();
        }
示例#14
0
 public void DisposeTestObjects()
 {
     ctx = null;
     oneSide1 = oneSide2 = oneSide3 = null;
     nSide1 = nSide2 = null;
 }
 public static void ToString(One_to_N_relations_N obj, MethodReturnEventArgs<string> e)
 {
     e.Result = obj.Name;
 }
示例#16
0
 private void ReloadObjects(IZetboxContext reloadCtx)
 {
     one1 = reloadCtx.Find<One_to_N_relations_One>(one1.ID);
     one2 = reloadCtx.Find<One_to_N_relations_One>(one2.ID);
     n1 = reloadCtx.Find<One_to_N_relations_N>(n1.ID);
     n2 = reloadCtx.Find<One_to_N_relations_N>(n2.ID);
 }
示例#17
0
 public void DisposeTestObjects()
 {
     ctx      = null;
     oneSide1 = oneSide2 = oneSide3 = null;
     nSide1   = nSide2 = null;
 }