


from Ft.Ods import Database
from Ft.Ods.StorageManager.Adapters import Constants
from Ft.Ods.MetaData import Expression
from Ft.Ods.MetaData import Constant
from Ft.Ods.MetaData import UnionCase

import test_metadata_util

def Test(tester,db,klass):


    tester.startGroup("Operand Interface on %s" % klass.__name__)

    test_metadata_util.test_form_drop(tester,db,klass,'operand_in',Expression.Expression)
    test_metadata_util.test_form_drop(tester,db,klass,'value_of',Constant.Constant)

    def GetCollection(db,values):
        from Ft.Ods.MetaData import Collection
        from Ft.Ods.MetaData import CollectionKind
        c = Collection.Collection(db,None,collection_kind=CollectionKind.ck_list)
        return c
    test_metadata_util.test_form_drop(tester,db,klass,'size_of',GetCollection)
    test_metadata_util.test_form_drop(tester,db,klass,'case_in',UnionCase.UnionCase)


    tester.groupDone()
