Example #1
0
        public override void SetUp()
        {
            base.SetUp();

            CreateDatabaseSchema();

            root                  = CreateOneItem <LinqItem>(0, "root", null);
            root.State            = ContentState.Published;
            root.StringProperty   = "a string";
            root.StringProperty2  = "another string";
            root.IntProperty      = 123;
            root.DateTimeProperty = now = N2.Utility.CurrentTime();
            root.DoubleProperty   = 345.678;
            root.BooleanProperty  = true;
            root.GetDetailCollection("CollectionProperty", true).AddRange(new[] { "hello", "world" });
            engine.Persister.Repository.SaveOrUpdate(root);

            item = CreateOneItem <LinqItem>(0, "item", null);
            item.StringProperty      = "a string";
            item.StringProperty2     = "yet another string";
            item.IntProperty         = 234;
            item.DateTimeProperty    = now.AddDays(-1);
            item.DoubleProperty      = 123456789;
            item.BooleanProperty     = false;
            item.ContentItemProperty = root;
            item.ZoneName            = "Hello";
            item.AddTo(root);

            engine.Persister.Repository.SaveOrUpdate(item);
        }
Example #2
0
        public override void SetUp()
        {
            base.SetUp();

            CreateDatabaseSchema();

            root = CreateOneItem<LinqItem>(0, "root", null);
            root.StringProperty = "a string";
            root.StringProperty2 = "another string";
            root.IntProperty = 123;
            root.DateTimeProperty = now = DateTime.Now;
            root.DoubleProperty = 345.678;
            root.BooleanProperty = true;

            item = CreateOneItem<LinqItem>(0, "item", null);
            item.StringProperty = "a string";
            item.StringProperty2 = "yet another string";
            item.IntProperty = 234;
            item.DateTimeProperty = now.AddDays(-1);
            item.DoubleProperty = 123456789;
            item.BooleanProperty = false;
            item.ContentItemProperty = root;

            engine.Persister.Repository.Save(root);
            engine.Persister.Repository.Save(item);

            Debug.WriteLine("===== Starting Test =====");
        }
Example #3
0
		public override void SetUp()
		{
			base.SetUp();

			CreateDatabaseSchema();

			root = CreateOneItem<LinqItem>(0, "root", null);
			root.State = ContentState.Published;
			root.StringProperty = "a string";
			root.StringProperty2 = "another string";
			root.IntProperty = 123;
			root.DateTimeProperty = now = N2.Utility.CurrentTime();
			root.DoubleProperty = 345.678;
			root.BooleanProperty = true;
			root.GetDetailCollection("CollectionProperty", true).AddRange(new[] { "hello", "world" });
			engine.Persister.Repository.SaveOrUpdate(root);

			item = CreateOneItem<LinqItem>(0, "item", null);
			item.StringProperty = "a string";
			item.StringProperty2 = "yet another string";
			item.IntProperty = 234;
			item.DateTimeProperty = now.AddDays(-1);
			item.DoubleProperty = 123456789;
			item.BooleanProperty = false;
			item.ContentItemProperty = root;
			item.ZoneName = "Hello";
			item.AddTo(root);

			engine.Persister.Repository.SaveOrUpdate(item);
		}
Example #4
0
        public override void SetUp()
        {
            base.SetUp();

            CreateDatabaseSchema();

            root = CreateOneItem <LinqItem>(0, "root", null);
            root.StringProperty   = "a string";
            root.StringProperty2  = "another string";
            root.IntProperty      = 123;
            root.DateTimeProperty = now = DateTime.Now;
            root.DoubleProperty   = 345.678;
            root.BooleanProperty  = true;

            item = CreateOneItem <LinqItem>(0, "item", null);
            item.StringProperty      = "a string";
            item.StringProperty2     = "yet another string";
            item.IntProperty         = 234;
            item.DateTimeProperty    = now.AddDays(-1);
            item.DoubleProperty      = 123456789;
            item.BooleanProperty     = false;
            item.ContentItemProperty = root;

            engine.Persister.Repository.Save(root);
            engine.Persister.Repository.Save(item);

            Debug.WriteLine("===== Starting Test =====");
        }