コード例 #1
0
ファイル: TestNullObject.cs プロジェクト: ekicyou/pasta
 public virtual void Test4()
 {
     DeleteBase("nullo");
     NeoDatis.Odb.Test.Nullobject.GenericClass gc = new NeoDatis.Odb.Test.Nullobject.GenericClass
                                                        (null);
     string[] strings = new string[] { "OBJ1", "obj2" };
     gc.SetObject(strings);
     NeoDatis.Odb.ODB odb = Open("nullo");
     odb.Store(gc);
     odb.Close();
     odb = Open("nullo");
     NeoDatis.Odb.Objects objects = odb.GetObjects(typeof(NeoDatis.Odb.Test.Nullobject.GenericClass
                                                          ));
     NeoDatis.Odb.Test.Nullobject.GenericClass gc2 = (NeoDatis.Odb.Test.Nullobject.GenericClass
                                                      )objects.GetFirst();
     gc2.SetObject("Ola");
     odb.Store(gc2);
     odb.Close();
 }
コード例 #2
0
ファイル: TestNullObject.cs プロジェクト: ekicyou/pasta
        public virtual void Test2()
        {
            DeleteBase("nullo");
            NeoDatis.Odb.Test.Nullobject.GenericClass gc = new NeoDatis.Odb.Test.Nullobject.GenericClass
                                                               (null);
            NeoDatis.Odb.ODB odb = Open("nullo");
            odb.Store(gc);
            odb.Close();
            odb = Open("nullo");
            NeoDatis.Odb.Objects <GenericClass>       objects = odb.GetObjects <GenericClass>();
            NeoDatis.Odb.Test.Nullobject.GenericClass gc2     = (NeoDatis.Odb.Test.Nullobject.GenericClass
                                                                 )objects.GetFirst();
            gc2.SetObject("Ola");
            odb.Store(gc2);
            odb.Close();
            odb     = Open("nullo");
            objects = odb.GetObjects <GenericClass>();
            AssertEquals(1, objects.Count);
            GenericClass gc3 = (GenericClass)objects.GetFirst();

            AssertEquals("Ola", gc3.GetObject());
            odb.Close();
        }
コード例 #3
0
ファイル: TestNullObject.cs プロジェクト: ekicyou/pasta
        public virtual void Test4()
		{
			DeleteBase("nullo");
			NeoDatis.Odb.Test.Nullobject.GenericClass gc = new NeoDatis.Odb.Test.Nullobject.GenericClass
				(null);
			string[] strings = new string[] { "OBJ1", "obj2" };
			gc.SetObject(strings);
			NeoDatis.Odb.ODB odb = Open("nullo");
			odb.Store(gc);
			odb.Close();
			odb = Open("nullo");
			NeoDatis.Odb.Objects objects = odb.GetObjects(typeof(NeoDatis.Odb.Test.Nullobject.GenericClass
				));
			NeoDatis.Odb.Test.Nullobject.GenericClass gc2 = (NeoDatis.Odb.Test.Nullobject.GenericClass
				)objects.GetFirst();
			gc2.SetObject("Ola");
			odb.Store(gc2);
			odb.Close();
		}