示例#1
0
        public virtual void TestEnumUpdate()
        {
            var baseName = GetBaseName();
            var odb      = Open(baseName);
            var e        = new ClassWithEnum("enum1", ObjectType.Medium);

            odb.Store(e);
            odb.Close();
            odb = Open(baseName);
            var query   = odb.Query <ClassWithEnum>();
            var objects = query.Execute <ClassWithEnum>();
            var cwe     = objects.GetFirst();

            cwe.SetObjectType(ObjectType.Small);
            odb.Store(cwe);
            odb.Close();
            odb = Open(baseName);
            var query1 = odb.Query <ClassWithEnum>();

            objects = query1.Execute <ClassWithEnum>();
            AssertEquals(1, objects.Count);

            cwe = objects.GetFirst();
            odb.Close();
            AssertEquals(ObjectType.Small, cwe.GetObjectType());
        }
示例#2
0
 public virtual void TestEnum1()
 {
     var baseName = GetBaseName();
     var odb = Open(baseName);
     var e = new ClassWithEnum("enum1", ObjectType.Medium);
     odb.Store(e);
     odb.Close();
     odb = Open(baseName);
     var query = odb.Query<ClassWithEnum>();
     var objects = query.Execute<ClassWithEnum>();
     odb.Close();
     AssertEquals(1, objects.Count);
 }
示例#3
0
        public virtual void TestEnum1()
        {
            var baseName = GetBaseName();
            var odb      = Open(baseName);
            var e        = new ClassWithEnum("enum1", ObjectType.Medium);

            odb.Store(e);
            odb.Close();
            odb = Open(baseName);
            var query   = odb.Query <ClassWithEnum>();
            var objects = query.Execute <ClassWithEnum>();

            odb.Close();
            AssertEquals(1, objects.Count);
        }
示例#4
0
        public virtual void TestEnumUpdate()
        {
            var baseName = GetBaseName();
            var odb = Open(baseName);
            var e = new ClassWithEnum("enum1", ObjectType.Medium);
            odb.Store(e);
            odb.Close();
            odb = Open(baseName);
            var query = odb.Query<ClassWithEnum>();
            var objects = query.Execute<ClassWithEnum>();
            var cwe = objects.GetFirst();
            cwe.SetObjectType(ObjectType.Small);
            odb.Store(cwe);
            odb.Close();
            odb = Open(baseName);
            var query1 = odb.Query<ClassWithEnum>();
            objects = query1.Execute<ClassWithEnum>();
            AssertEquals(1, objects.Count);

            cwe = objects.GetFirst();
            odb.Close();
            AssertEquals(ObjectType.Small, cwe.GetObjectType());
        }