The SBLIM CIM Client for Java ships with a large collection of around 190
unit tests. Whenever you the "all" target is build with ant the complete
unit test suite will be executed. This document describes what is covered
by these tests.
In addition to unit tests we have a function test package. This is not
yet published or documented, but will be in one of the next releases.
The unit tests are all self-contained, there's is no external dependency.
In contradiction our function test is executed against various CIMOM
backends.
testEnumClassesDOM/SAX/PULL |
Builds an enumerateClasses XML response from sample data, than parses it
and checks that it matches with the sample data. |
testEnumInstancesDOM/SAX/PULL |
Builds an enumerateInstances XML response from sample data, than parses
it and checks that it matches with the sample data. |
testAssociatorClassNamesDOM/SAX/PULL |
Builds an associatorClassNames XML response from sample data, than
parses it and checks that it matches with the sample data. |
testAssociatorInstanceNamesDOM/SAX/PULL |
Builds an associatorInstanceNames XML response from sample data, than
parses it and checks that it matches with the sample data. |
testAssocClassesDOM/SAX/PULL |
Builds an associatorClassNames XML response from sample data, than
parses it and checks that it matches with the sample data. |
testAssocInstancesDOM/SAX/PULL |
Builds an associatorInstances XML response from sample data, than
parses it and checks that it matches with the sample data. |
testEnumQualiTypesDOM/SAX/PULL |
Builds an enumerateQualifierTypes XML response from sample data, than
parses it and checks that it matches with the sample data. |
testMethodRspSAX/DOM |
Builds MethodResponse XML data from sample data, than parses it and
checks that it matches with the sample data. |
testSVCMethodRsp0SAX/DOM |
Parses a hand edited SVC MethodResponse XML file and checks that it
matches with the sample data. |
testSVCMethodRspSmpl0SAX/DOM |
Parses a captured SVC MethodResponse XML file and checks that it
matches with the sample data. |
testGetInstanceDOM/SAX/PULL |
Parses a getInstance XML response which contains Embedded Objects, than
checks that it matches with the sample data. |
testNegativeGetInstanceDOM/SAX/PULL |
Parses a getInstance XML response which contains an Embedded class with
an EmbeddedObject="instance" attribute, if the parsing doesn't throw an
Exception the testcase fails. |
testGetClassDOM/SAX/PULL |
Parses a getClass XML response which contains Embedded Objects, than
checks that it matches with the sample data. |
testMethodRsp |
Parses a methodResponse XML request, with SAX, which contains Embedded Objects, than
checks that it matches with the sample data. |
testMethodRspDOM |
Parses a methodResponse XML request, with DOM, which contains Embedded Objects, than
checks that it matches with the sample data. |
testSVCMethodRspSAX/DOM |
Checks that the XML parsers are able to parse SVC CIMOM's wrongly built
RETURNVALUE types as CIMDataType.STRING_T. |
testScalarDataTypes |
Tests scalar CIMDataTypes (UINT8_T, UINT16_T, etc.) along with
CIMHelper.ScalarDataType. |
testUnboundedArrayDataTypes |
Tests unbounded array CIMDataTypes (UINT8_ARRAY_T, UINT16_ARRAY_T,
etc.) along with CIMHelper.UnboundedArrayDataType. |
testBoundedArrayDataTypes |
Tests bounded array CIMDataTypes (UINT8_ARRAY_T, UINT16_ARRAY_T,
etc.) along with CIMHelper.UnboundedArrayDataType. |
testReferenceType |
Tests scalar, bounded array and unbounded array reference CIMDataTypes
with valid class name, empty class name and null class name. |
testGetDataType |
Tests the static getDataType method. |
testCalendarConstructor |
Builds up a CIMDateTimeAbsolute with the Calendar constructor, than
checks that the values by the getters are matched with the values
contained in the Calendar.
Builds a CIMDateTimeAbsolute with a Calendar, which year value is over
the limit, fails if Exception is not thrown. |
testStringConstructor |
Builds a CIMDateTimeAbsolute instance with the String constructor, than
checks that the getters provide good values. |
testStringConstructorNegative |
Tries to build several instances by passing badly formatted values to
the String constructor. The testcase fails if Exception is not thrown. |
testUnsignificantYear |
Builds an instance with the String constructor by passing a value where
the year is unsignificant. The getters are checked. Then tries to build
instances with badly formed unsignificant year fields and fails if
Exceptions are not thrown. |
testMonth |
Builds an instance with the String constructor by passing value where
the month is unsignificant. The getters are checked. Then tries to build
instances with badly formed month fields and fails if Exceptions are not
thrown. |
testDay |
Builds an instance with the String constructor by passing value where
the day is unsignificant. The getters are checked. Then tries to build
instances with badly formed day fields and fails if Exceptions are not
thrown. |
testHour |
Builds an instance with the String constructor by passing value where
the hour is unsignificant. The getters are checked. Then tries to build
instances with badly formed hour fields and fails if Exceptions are not
thrown. |
testMinute |
Builds an instance with the String constructor by passing value where
the minute is unsignificant. The getters are checked. Then tries to
build instances with badly formed minute fields and fails if Exceptions
are not thrown. |
testSec |
Builds an instance with the String constructor by passing value where
the second is unsignificant. The getters are checked. Then tries to
build instances with badly second month fields and fails if Exceptions
are not thrown. |
testUSec |
Builds an instance with the String constructor by passing value where
the microseconds is unsignificant. The getters are checked. Then tries
to build instances with badly formed microseconds fields and fails if
Exceptions are not thrown. |
testUTC |
Does negative tests with the String constructor and badly formed UTC
values. |
testCompareUTC |
Checks that compareTo() works for UTC. |
testCompareUSec |
Checks that compareTo() works for microseconds. |
testCompareSec |
Checks that compareTo() works for seconds. |
testCompareMin |
Checks that compareTo() works for minutes. |
testCompareHour |
Checks that compareTo() works for hours. |
testCompareDay |
Checks that compareTo() works for days. |
testCompareMonth |
Checks that compareTo() works for months. |
testCompareYear |
Checks that compareTo() works for years. |
testIntConstructor |
Creates an instance with the int constructor and checks the getters.
Creates several instances with unsignificant fields and checks
toString().
Checks that the int constructor throws Exception for invalid values. |
testLongConstructor |
Makes an instance with the long constructor and checks the getters.
Negative tests are also done by calling the constructor with values
outside the limits. |
testStrConstructor |
Creates an instance with the String constructor and checks the getters.
Tries to make several instances with wrong String constructor
parameters, the testcase fails if Exception is not thrown for the wrong
values. |
testDays |
Checks that compareTo() works for days. |
testHours |
Checks that compareTo() works for hours. |
testMins |
Checks that compareTo() works for minutes. |
testSecs |
Checks that compareTo() works for seconds. |
testUSecs |
Checks that compareTo() works for microseconds. |
testTotalMSecs |
Checks that getTotalMilliseconds() works. |
testInternalListeners |
Tests if all three internal listeners come up correctly and that isLoggable
works correctly. |
testExternalListeners |
Tests if external listeners come up correctly and that isLoggable works
correctly. |
testListeners |
Tests if all three internal listeners and external listeners come up
correctly, that they can be removed successfully and that isLoggable works
correctly in all cases. |
testMessage1 |
Tests if a log message is forwarded correctly to the log&trace listeners.
This test checks the message level, locale, parameter. |
testMessage2 |
Tests if a log message containing an exception is forwarded correctly to
the log&trace listeners.
This test checks the message level, locale, exception parameter. |
testTrace |
Tests if a log message is forwarded correctly to the log&trace listeners.
This test checks the message level, locale, exception parameter. |
testCIMXMLTrace |
Tests if a log message is forwarded correctly to the CIM-XML trace listeners.
This test checks the message level, message and outgoing indicator. |
testByteConstructorGood |
Tests valid invocations of the CIMOctetString(UnsignedInteger8[])
constructor by examining return values from getASCIIString() and
getHexString(). |
testHexConstructorGood |
Tests valid invocations of the CIMOctetString(String, true)
constructor by examining return values from getASCIIString() and
getBytes(). |
testAsciiConstructorGood |
Tests valid invocations of the CIMOctetString(String, false)
constructor by examining return values from getHexString() and
getBytes(). |
testByteConstructorBad |
Tests invalid invocations of the CIMOctetString(UnsignedInteger8[])
constructor by expecting IllegalArgumentExceptions. |
testHexConstructorBad |
Tests invalid invocations of the CIMOctetString(String, true)
constructor by expecting IllegalArgumentExceptions. |
testAsciiConstructorBad |
Tests invalid invocations of the CIMOctetString(String, false)
constructor by expecting IllegalArgumentExceptions. |
testEquals |
Tests valid and invalid invocations of the equals() and hashCode()
methods. |