Information Technology Reference
In-Depth Information
2 Basic Concepts and Notation
In this section, we briefly review the main concepts and notation of the conceptual
schemas under test, and of the testing language.
2.1 Conceptual Schema Under Test
A conceptual schema consists of a structural (sub)schema and a behavioral
(sub)schema. The structural schema consists of a taxonomy of entity types (a set of
entity types with their generalization/specialization relationships and the taxonomic
constraints), a set of relationship types (attributes and associations), the cardinality
constraints of the relationship types and a set of other constraints formally defined in
OCL
[13]
. We adopt UML/OCL as the conceptual modeling language, but the ideas
also able to deal with temporal constraints, but for presentation purposes we omit
them here. Figure
1
shows a structural schema fragment that will be used throughout
the chapter.
0..1
0..1
ShoppingCart
Customer
name : String
eMailAddress : EMail
password : String
1
1
0..1
Session
id : Natural
0..1
0..1
0..1
*
{ordered}
Order
id : PositiveInteger
/name : String
/eMail : String
/total : Real
1..*
ShoppingCartItem
quantity : PositiveInteger
/unitPrice : Real
/price : Real
Product
name : String
netPrice : Real
quantityOnHand : Integer
/quantityOrdered : Natural
/finalNetPrice : Real
*
1
1
1
{ordered}
1..*
{overlapping,incomplete}
OrderLine
/name : String
/unitPrice : Real
/price : Real
quantity : PositiveInteger
Special
specialNetPrice : Real
DownloadableProduct
*
link : URL
context
Session
inv
CustomerCartWhenLoggedIn
:
self.customer->notEmpty()
and
self.shoppingCart->notEmpty()
implies
self.customer.shoppingCart=
self.shoppingCart
context
Order::total:Real
derive:
self.orderLine.price->sum()
context
Product
inv
nameIsUnique
:
Product.allInstances()->isUnique(name)
Fig. 1
Fragment of the osCommerce structural schema
Search WWH ::
Custom Search