1 |
# Testing unit for Class Repository |
# GNU Enterprise Application Server - Testing unit for Class Repository |
2 |
|
# |
3 |
|
# Copyright 2003 Free Software Foundation |
4 |
|
# |
5 |
|
# This file is part of GNU Enterprise. |
6 |
|
# |
7 |
|
# GNU Enterprise is free software; you can redistribute it |
8 |
|
# and/or modify it under the terms of the GNU General Public |
9 |
|
# License as published by the Free Software Foundation; either |
10 |
|
# version 2, or (at your option) any later version. |
11 |
|
# |
12 |
|
# GNU Enterprise is distributed in the hope that it will be |
13 |
|
# useful, but WITHOUT ANY WARRANTY; without even the implied |
14 |
|
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR |
15 |
|
# PURPOSE. See the GNU General Public License for more details. |
16 |
|
# |
17 |
|
# You should have received a copy of the GNU General Public |
18 |
|
# License along with program; see the file COPYING. If not, |
19 |
|
# write to the Free Software Foundation, Inc., 59 Temple Place |
20 |
|
# - Suite 330, Boston, MA 02111-1307, USA. |
21 |
|
# |
22 |
|
# $Id$ |
23 |
|
# |
24 |
|
# This testing unit dumps some values of class definitions. |
25 |
|
# |
26 |
|
|
27 |
from language import App |
from language import App |
28 |
from gnue.appserver import classrep |
from gnue.appserver import classrep |
40 |
print "Fullname:", aClass.fullName |
print "Fullname:", aClass.fullName |
41 |
print "Id :", aClass.gnue_id |
print "Id :", aClass.gnue_id |
42 |
print "Module :", aClass.module.fullName |
print "Module :", aClass.module.fullName |
43 |
|
print "Comment :", aClass.gnue_comment |
44 |
|
|
45 |
print "\nProperties:" |
print "\nProperties:" |
46 |
|
|
53 |
|
|
54 |
print "End of dump for '%s'\n" % aName |
print "End of dump for '%s'\n" % aName |
55 |
|
|
56 |
|
# dump some class definitions |
57 |
dumpClass ('address_person') |
dumpClass ('address_person') |
58 |
dumpClass ('gnue_class') |
dumpClass ('gnue_class') |
59 |
|
|
62 |
y = x.findProp ('gnue_name') |
y = x.findProp ('gnue_name') |
63 |
print "Fullname:", y.fullName |
print "Fullname:", y.fullName |
64 |
print "Module :", y.klass.module.fullName |
print "Module :", y.klass.module.fullName |
65 |
|
print "Type :", y.gnue_type |