Test Description and Specification for TypeConstraintException tests

This exception indicates that a violation of a dynamically checked type constraint was detected.



public TypeConstraintException(java.lang.String message)

Description

Domain testing of input and output conditions, and external pre-conditions for class TypeConstraintException, constructor public TypeConstraintException(java.lang.String message).

Assertion testing

Assertion Expected results Test Case ID
Construct a TypeConstraintException with the specified detail message. the message is what set Ctor001
The errorCode will default to null. errorCode is null Ctor002
The linkedException will default to null. linkedException is null Ctor003

Test Descriptions


See:
Test descriptions for TypeConstraintExceptionTests.java (Ctor001, Ctor002, Ctor003)


public TypeConstraintException(java.lang.String message, java.lang.String errorCode)

Description

Domain testing of input and output conditions, and external pre-conditions for class TypeConstraintException, constructor public TypeConstraintException(java.lang.String message, java.lang.String errorCode).

Assertion testing

Assertion Expected results Test Case ID
Construct a TypeConstraintException with the specified detail message. the message is what set Ctor004
Construct a TypeConstraintException with the specified errorCode. the errorCode is what set Ctor005
The linkedException will default to null. linkedException is null Ctor006

Test Descriptions


See:
Test descriptions for TypeConstraintExceptionTests.java (Ctor004, Ctor005, Ctor006)


public TypeConstraintException(java.lang.String message, java.lang.String errorCode, java.lang.Throwable exception)

Description

Domain testing of input and output conditions, and external pre-conditions for class TypeConstraintException, constructor public TypeConstraintException(java.lang.String message, java.lang.String errorCode, java.lang.Throwable exception).

Assertion testing

Assertion Expected results Test Case ID
Construct a TypeConstraintException with the specified detail message. the message is what set Ctor007
Construct a TypeConstraintException with the specified errorCode. the errorCode is what set Ctor008
Construct a TypeConstraintException with the specified linkedException. linkedException is what set Ctor009

Test Descriptions


See:
Test descriptions for TypeConstraintExceptionTests.java (Ctor007, Ctor008, Ctor009)


public TypeConstraintException(java.lang.String message, java.lang.Throwable exception)

Description

Domain testing of input and output conditions, and external pre-conditions for class TypeConstraintException, constructor public TypeConstraintException(java.lang.String message, java.lang.Throwable exception).

Assertion testing

Assertion Expected results Test Case ID
Construct a TypeConstraintException with the specified detail message. the message is what set Ctor010
The errorCode will default to null. errorCode is null Ctor011
Construct a TypeConstraintException with the specified linkedException. linkedException is what set Ctor012

Test Descriptions


See:
Test descriptions for TypeConstraintExceptionTests.java (Ctor010, Ctor011, Ctor012)


public TypeConstraintException(java.lang.Throwable exception)

Description

Domain testing of input and output conditions, and external pre-conditions for class TypeConstraintException, constructor public TypeConstraintException(java.lang.Throwable exception).

Assertion testing

Assertion Expected results Test Case ID
The detail message will default to null. the message is null Ctor013
The errorCode will default to null. errorCode is null Ctor014
Construct a TypeConstraintException with the specified linkedException. linkedException is what set Ctor015

Test Descriptions


See:
Test descriptions for TypeConstraintExceptionTests.java (Ctor013, Ctor014, Ctor015)


public java.lang.String getErrorCode()

Description

Domain testing of input and output conditions, and external pre-conditions for class TypeConstraintException, method public java.lang.String getErrorCode().

Boundary value analysis

Pre-conditions Expected output value Test Case ID
errorCode set to null null Ctor002
errorCode set to a non-null value non-null Ctor005

Assertion testing

Pre-conditions Assertion Expected output value Test Case ID
errorCode set to a non-null value Get the vendor specific error code. the errorCode is what set Ctor008

Test Descriptions


See:
Test descriptions for TypeConstraintExceptionTests.java (Ctor002, Ctor005, Ctor008)


public java.lang.Throwable getLinkedException()

Description

Domain testing of input and output conditions, and external pre-conditions for class TypeConstraintException, method public java.lang.Throwable getLinkedException().

Assertion testing

Pre-conditions Assertion Expected output value Test Case ID
linkedException set to a non-null value Get the linked exception. the linkedException is what set Ctor008

Test Descriptions


See:
Test descriptions for TypeConstraintExceptionTests.java (Ctor008)


public void printStackTrace()

Description

Domain testing of input and output conditions, and external pre-conditions for class TypeConstraintException, method public void printStackTrace().

Assertion testing

Pre-conditions Assertion Expected results Test Case ID
linkedException is set to a non-null value Prints this TypeConstraintException and its stack trace (including the stack trace of the linkedException if it is non-null) to the PrintStream. the linkedException's method printStackTrace() or printStackTrace(PrintStream) is called Ctor019

Test Descriptions


See:
Test descriptions for TypeConstraintExceptionTests.java (Ctor019)


public void printStackTrace(java.io.PrintStream s)

Description

Domain testing of input and output conditions, and external pre-conditions for class TypeConstraintException, method public void printStackTrace(java.io.PrintStream s).

Assertion testing

Pre-conditions Assertion Expected results Test Case ID
linkedException is set to a non-null value Prints this TypeConstraintException and its stack trace (including the stack trace of the linkedException if it is non-null) to the PrintStream. the linkedException's method printStackTrace(PrintStream) is called Ctor020
error message is set to a non-null value Prints this TypeConstraintException and its stack trace to the PrintStream. at leat one byte has been written to the PrintWriter's stream Ctor021

Test Descriptions

Test cases included:
Ctor001, Ctor002, Ctor003, Ctor004, Ctor005, Ctor006, Ctor007, Ctor008, Ctor009, Ctor010, Ctor011, Ctor012, Ctor013, Ctor014, Ctor015, Ctor016, Ctor017, Ctor018, Ctor019, Ctor020, Ctor021.

ItemValue
title General tests of constructors and methods
source TypeConstraintExceptionTests.java
executeClass javasoft.sqe.tests.api.jakarta.xml.bind.TypeConstraintException.TypeConstraintExceptionTests
keywords runtime positive
executeArgs -TestCaseID ALL


public void setLinkedException(java.lang.Throwable exception)

Description

Domain testing of input and output conditions, and external pre-conditions for class TypeConstraintException, method public void setLinkedException(java.lang.Throwable exception).

Boundary value analysis

Pre-conditions exception Expected results Test Case ID
linkedException is not set non-null the linkedException is what set Ctor017
linkedException is set to a non-null value null the linkedException is null Ctor018

Assertion testing

Pre-conditions Assertion Expected results Test Case ID
Add the linked exception. linkedException is what set Ctor017
linkedException is set to a non-null value A null value is permitted and indicates that the linked exception does not exist or is unknown. linkedException is null Ctor018

Test Descriptions


See:
Test descriptions for TypeConstraintExceptionTests.java (Ctor017, Ctor018)


public java.lang.String toString()

Description

Domain testing of input and output conditions, and external pre-conditions for class TypeConstraintException, method public java.lang.String toString().

Assertion testing

Pre-conditions Assertion Expected output value Test Case ID
detail message, error code and linked exception are not null Returns a short description of this TypeConstraintException. non-empty string Ctor016

Test Descriptions


See:
Test descriptions for TypeConstraintExceptionTests.java (Ctor016)


Last updated: 02/11/04
Copyright © 2017, 2020 Oracle and/or its affiliates. All rights reserved.