Définitions d'un test
- Un test doit permettre de diagnostiquer un problème.
- Il doit si possible montrer où est le problème.
- Pour faire un test, on doit savoir quel résultat on attend.
| 0..1 | Aucune ou une instance |
| 1 | Une instance exactement |
| 0..* ou * | Aucune ou plusieurs instances |
| 1..* | Une instance ou plusieurs (au moins une) |
Class
|
Method
|
Description
|
@RequestMapping
(value="/order.htm")
|
Maps to all requests on the order.htm
URL.
| |
@RequestMapping
("/order.htm")
|
@RequestMapping
(method=RequestMethod.GET)
|
Maps to all GET requests to the order.html URL.
|
@RequestMapping
("/order.*")
|
@RequestMapping
(method={RequestMethod.PUT,
RequestMethod.POST})
|
Maps to all PUT and POST requests to the order.* URL. * means any suffix
or extension such as .htm, .doc, .xls, and so on.
|
@RequestMapping
(value="/customer.htm",
consumes="application/json")
|
@RequestMapping
(produces="application/xml")
|
Maps to all requests that post JSON and accept XML as a response.
|
@RequestMapping
(value="/order.htm")
|
@RequestMapping
(params="add-line",
method=RequestMethod.POST)
|
Maps to all POST requests to the order.htm URL that include an addline parameter.
|
@RequestMapping
(value="/order.htm")
|
@RequestMapping
(headers="!VIA")
|
Maps to all requests to the order.htm URL that don’t include a VIA HTTP
Header.
|