public ValidationEventCollector()
public ValidationEvent[] getEvents()
public boolean handleEvent(ValidationEvent event)
public boolean hasEvents()
public void reset()
public ValidationEventCollector()
Domain testing of input and output conditions, and external
pre-conditions for class ValidationEventCollector,
constructor public ValidationEventCollector()
.
Assertion | Expected results | Test Case ID |
---|---|---|
ValidationEventCollector(): no exceptions are thrown. | no exceptions | CtorHandle001 |
public ValidationEvent[] getEvents()
Domain testing of input and output conditions, and external
pre-conditions for class ValidationEventCollector,
method public ValidationEvent[] getEvents()
.
Assertion | Expected results | Test Case ID |
---|---|---|
handleEvent(ValidationEvent event), event severity is: WARNING, ERROR, FATAL_ERROR, totally 6 events, getEvents() returns a copy of all the collected errors and warnings. | getEvents() returns array of length 6, returned events are copies of handled | CtorHandle005 |
no events were handled, getEvents() returns an empty array if there weren't any. | getEvents() returns array of length 0 | CtorHandle006 |
collector was cleared by reset(), getEvents() returns an empty array if there are not events collected. | getEvents() returns an empty array | CtorHandle007 |
public boolean handleEvent(ValidationEvent event)
Domain testing of input and output conditions, and external
pre-conditions for class ValidationEventCollector,
method public boolean handleEvent(ValidationEvent event)
.
Assertion | Expected results | Test Case ID |
---|---|---|
handleEvent(ValidationEvent event): event severity is ERROR, handleEvent(event) is invoked to cover handling ERRORs. | CtorHandle001 | |
handleEvent(ValidationEvent event): event severity is FATAL_ERROR, handleEvent(event) returns false. | handleEvent(event) returns false | CtorHandle002 |
handleEvent(ValidationEvent event): event severity is WARNING, handleEvent(event) is invoked to cover handling WARNINGs. | CtorHandle003 | |
handleEvent(null) is invoked, subsequent handleEvent(event) with FATAL_ERROR returns false. | handleEvent(null) does not affect subsequent hasEvents(), handleEvent(event), getEvents() | CtorHandle004 |
public boolean hasEvents()
Domain testing of input and output conditions, and external
pre-conditions for class ValidationEventCollector,
method public boolean hasEvents()
.
Assertion | Expected results | Test Case ID |
---|---|---|
no events were handled, hasEvents() returns false if this event collector contains no events. | hasEvents() returns false | CtorHandle006 |
collector was cleared by reset(), hasEvents() returns false if this event collector contains no events, otherwise true. | hasEvents() returns true if events were handled, false after the collector was reset | CtorHandle007 |
Test cases included:
CtorHandle001,
CtorHandle002,
CtorHandle003,
CtorHandle004,
CtorHandle005,
CtorHandle006,
CtorHandle007.
Item | Value |
---|---|
title | Constructor tests |
source | CtorHandleTests.java |
executeClass | javasoft.sqe.tests.api.jakarta.xml.bind.helpers.ValidationEventCollector.CtorHandleTests |
keywords | runtime positive |
executeArgs | -TestCaseID ALL |
public void reset()
Domain testing of input and output conditions, and external
pre-conditions for class ValidationEventCollector,
method public void reset()
.
Assertion | Expected results | Test Case ID |
---|---|---|
no events were handled, reset() clears all collected errors and warnings. | reset() throws no exceptions, does not affect the empty collector | CtorHandle006 |
several events were handled, reset() clears all collected errors and warnings. | reset() clears all collected errors and warnings | CtorHandle007 |