X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;ds=sidebyside;f=tests.lisp;h=31bd7fafeb8bf239182e9e736c8de67ca238d285;hb=2b03b3bd171decdd6aab2846a275f5a63424d689;hp=8ff7fba4a2d30b1f2b877021d7bc340cf1e4a744;hpb=7578d25c5e6fe5e451c83d4ac427caaf618d8937;p=hyperobject.git
diff --git a/tests.lisp b/tests.lisp
index 8ff7fba..31bd7fa 100644
--- a/tests.lisp
+++ b/tests.lisp
@@ -7,9 +7,9 @@
;;;; Programmer: Kevin M. Rosenberg
;;;; Date Started: Apr 2003
;;;;
-;;;; $Id: tests.lisp,v 1.3 2003/04/28 21:11:55 kevin Exp $
+;;;; $Id: tests.lisp,v 1.7 2003/05/14 08:30:38 kevin Exp $
;;;;
-;;;; 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
@@ -25,6 +25,7 @@
: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
@@ -58,7 +59,7 @@
:subobject t))
(:metaclass hyperobject-class)
(:default-initargs :title nil :street nil)
- (:user-name "Address")
+ (:user-name "Address" "Addresses")
(:default-print-slots title street)
(:description "An address"))
@@ -68,7 +69,8 @@
: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)
@@ -102,13 +104,13 @@
(rem-all-tests)
-(deftest p1 (view-to-string mary) " Person:
+(deftest p1 (view-to-string mary) "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) "Person:
Mary Jackson Thu, 4 May 2000 03:02:01 Style & Grace
- Addresss:
+ Addresses:
Home 321 Shady Lane
Phone Numbers:
Voice 367-9812
@@ -120,11 +122,280 @@
Fax 123-0005
")
-(deftest p3 (view-to-string mary :category t)
- "")
+(deftest p3 (view-to-string mary :category :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 :html-labels)
+ "
Person:
+- first-name Mary last-name Jackson dob Thu, 4 May 2000 03:02:01 resume Style & Grace
+
Addresses:
+ - title Home street 321 Shady Lane
+
Phone Numbers:
+ - title Voice phone-number 367-9812
+
+ - title Fax phone-number 367-9813
+
+
+
+ - title Office street 113 Main St.
+
Phone Numbers:
+ - title Main line phone-number 123-0001
+
+ - title Staff line phone-number 123-0002
+
+ - title Fax phone-number 123-0005
+
+
+
+
+
+
+")
+
+
+
+(deftest p5 (view-to-string mary :subobjects t :category :html)
+ "Person:
+- Mary Jackson Thu, 4 May 2000 03:02:01 Style & Grace
+
Addresses:
+ - Home 321 Shady Lane
+
Phone Numbers:
+ - Voice 367-9812
+
+ - Fax 367-9813
+
+
+
+ - Office 113 Main St.
+
Phone Numbers:
+ - Main line 123-0001
+
+ - Staff line 123-0002
+
+ - Fax 123-0005
+
+
+
+
+
+
+")
+
+(deftest p6 (view-to-string mary :subobjects t :category :html-labels)
+ "Person:
+- first-name Mary last-name Jackson dob Thu, 4 May 2000 03:02:01 resume Style & Grace
+
Addresses:
+ - title Home street 321 Shady Lane
+
Phone Numbers:
+ - title Voice phone-number 367-9812
+
+ - title Fax phone-number 367-9813
+
+
+
+ - title Office street 113 Main St.
+
Phone Numbers:
+ - title Main line phone-number 123-0001
+
+ - title Staff line phone-number 123-0002
+
+ - title Fax phone-number 123-0005
+
+
+
+
+
+
+")
+
+(deftest p7 (view-to-string mary :subobjects t :category :xml)
+ "Person:
+
+ Addresses:
+
+ Phone Numbers:
+
+
+
+
+
+
+
+ Phone Numbers:
+
+
+
+
+
+
+
+
+
+
+
+")
-(deftest p4 (view-to-string mary :subobjects t :category t)
- "")
+(deftest p8 (view-to-string mary :subobjects t :category :xml-labels)
+ "Person:
+
+ Addresses:
+
+ Phone Numbers:
+
+
+
+
+
+
+
+ Phone Numbers:
+
+
+
+
+
+
+
+
+
+
+
+")
+
+(deftest p9 (view-to-string mary :subobjects t :category :ie-xml-link-labels)
+ "Person:
+
+ Addresses:
+
+ Phone Numbers:
+
+
+
+
+
+
+
+ Phone Numbers:
+
+
+
+
+
+
+
+
+
+
+
+")
+
+(deftest p10 (view-to-string mary :subobjects t :category :xml-link-labels)
+ "Person:
+
+ Addresses:
+
+ Phone Numbers:
+
+
+
+
+
+
+
+ Phone Numbers:
+
+
+
+
+
+
+
+
+
+
+
+")
+
+(deftest p11 (view-to-string mary :subobjects t :category :xhtml)
+ "Person:
+-
+
Addresses:
+ -
+
Phone Numbers:
+
+ -
+
Phone Numbers:
+
+
+
+
+")
+
+(deftest p12 (view-to-string mary :subobjects t :category :xhtml-labels)
+ "Person:
+- first-name Mary last-name Jackson dob Thu, 4 May 2000 03:02:01 resume Style & Grace
+
Addresses:
+ - title Home street 321 Shady Lane
+
Phone Numbers:
+ - title Voice phone-number 367-9812
+
+ - title Fax phone-number 367-9813
+
+
+
+ - title Office street 113 Main St.
+
Phone Numbers:
+ - title Main line phone-number 123-0001
+
+ - title Staff line phone-number 123-0002
+
+ - title Fax phone-number 123-0005
+
+
+
+
+
+
+")
+
+(deftest p13 (view-to-string mary :subobjects t :category :xhtml-link-labels)
+ "Person:
+- first-name dob resume
+
Addresses:
+ - title street
+
Phone Numbers:
+ - title
+
+ - title
+
+
+
+ - title street
+
Phone Numbers:
+ - title
+
+ - title
+
+ - title
+
+
+
+
+
+
+")
-(deftest p5 (view-to-string mary :subobjects t :category :xml-link-labels)
- "")