;;;; Programmer: Kevin M. Rosenberg
;;;; Date Started: Apr 2003
;;;;
-;;;; $Id: tests.lisp,v 1.3 2003/04/28 21:11:55 kevin Exp $
+;;;; $Id$
;;;;
-;;;; This file is Copyright (c) 2000-2002 by Kevin M. Rosenberg
+;;;; This file is Copyright (c) 2000-2003 by Kevin M. Rosenberg
;;;; *************************************************************************
(defpackage #:hyperobject-tests
:value-type (varchar 30)
:value-constraint stringp
:hyperlink find-person-by-last-name
+ :hyperlink-parameters (("narrow" . "yes"))
:null-allowed nil)
(full-name :value-type string :stored nil)
(dob :initarg :dob :accessor dob
(addresses :initarg :addresses :accessor addresses
:subobject t))
(:metaclass hyperobject-class)
- (:default-initargs :first-name "" :last-name "" :dob 0 :resume nil)
+ (:default-initargs :first-name "" :last-name "" :dob 0 :resume nil)
(:default-print-slots first-name last-name dob resume)
(:user-name "Person")
(:description "A Person")
(phones :initarg :phones :accessor phones
:subobject t))
(:metaclass hyperobject-class)
- (:default-initargs :title nil :street nil)
- (:user-name "Address")
+ (:default-initargs :title nil :street nil)
+ (:user-name "Address" "Addresses")
(:default-print-slots title street)
(:description "An address"))
:value-constraint stringp)
(phone-number :initarg :phone-number :accessor phone-number
:value-type (varchar 16)
- :value-constraint stringp))
+ :value-constraint stringp
+ :hyperlink search-phone-number))
(:metaclass hyperobject-class)
(:user-name "Phone Number")
(:default-initargs :title nil :phone-number nil)
(defparameter office (make-instance 'address :title "Office" :street "113 Main St."
:phones (list office-phone-1 office-phone-2 office-phone-3)))
-
+
(defparameter mary (make-instance 'person :first-name "Mary" :last-name "Jackson"
:dob (encode-universal-time
1 2 3 4 5 2000)
(rem-all-tests)
-(deftest p1 (view-to-string mary) " Person:
+(deftest :p1 (view-to-string mary :vid :compact-text) "Person:
Mary Jackson Thu, 4 May 2000 03:02:01 Style & Grace
")
-(deftest p2 (view-to-string mary :subobjects t) " Person:
+(deftest :p2 (view-to-string mary :subobjects t :vid :compact-text) "Person:
Mary Jackson Thu, 4 May 2000 03:02:01 Style & Grace
- Addresss:
+ Addresses:
Home 321 Shady Lane
Phone Numbers:
Voice 367-9812
Fax 123-0005
")
-(deftest p3 (view-to-string mary :category t)
- "")
+(deftest :p3 (view-to-string mary :vid :compact-text-labels)
+ "Person:
+ first-name Mary last-name Jackson dob Thu, 4 May 2000 03:02:01 resume Style & Grace
+")
-(deftest p4 (view-to-string mary :subobjects t :category t)
- "")
+(deftest :p4 (view-to-string mary :vid :compact-text)
+"Person:
+ Mary Jackson Thu, 4 May 2000 03:02:01 Style & Grace
+")
-(deftest p5 (view-to-string mary :subobjects t :category :xml-link-labels)
- "")