public virtual void Test23() { DeleteBase("nullo"); NeoDatis.Odb.Test.Nullobject.GenericClass gc = new NeoDatis.Odb.Test.Nullobject.GenericClass (null); gc.GetObjects()[0] = new NeoDatis.Odb.Test.VO.Login.Function("f1"); 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.GetObjects()[0] = System.Convert.ToInt64(1); gc2.GetObjects()[1] = System.Convert.ToInt64(2); odb.Store(gc2); odb.Close(); odb = Open("nullo"); objects = odb.GetObjects(typeof(NeoDatis.Odb.Test.Nullobject.GenericClass)); AssertEquals(1, objects.Count); NeoDatis.Odb.Test.Nullobject.GenericClass gc3 = (NeoDatis.Odb.Test.Nullobject.GenericClass )objects.GetFirst(); object[] longs2 = (object[])gc3.GetObjects(); AssertEquals(10, longs2.Length); AssertEquals(System.Convert.ToInt64(1), longs2[0]); AssertEquals(System.Convert.ToInt64(2), longs2[1]); odb.Close(); }
/// <exception cref="System.Exception"></exception> public virtual void Test21() { 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 objects = odb.GetObjects(typeof(NeoDatis.Odb.Test.Nullobject.GenericClass )); NeoDatis.Odb.Test.Nullobject.GenericClass gc2 = (NeoDatis.Odb.Test.Nullobject.GenericClass )objects.GetFirst(); long[] longs = new long[] { System.Convert.ToInt64(1), System.Convert.ToInt64(2) }; gc2.SetObjects(longs); odb.Store(gc2); odb.Close(); odb = Open("nullo"); objects = odb.GetObjects(typeof(NeoDatis.Odb.Test.Nullobject.GenericClass)); AssertEquals(1, objects.Count); NeoDatis.Odb.Test.Nullobject.GenericClass gc3 = (NeoDatis.Odb.Test.Nullobject.GenericClass )objects.GetFirst(); long[] longs2 = (long[])gc3.GetObjects(); AssertEquals(2, longs2.Length); AssertEquals(System.Convert.ToInt64(1), longs2[0]); AssertEquals(System.Convert.ToInt64(2), longs2[1]); odb.Close(); }