|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.joda.time.field.TestUnsupportedDateTimeField
public class TestUnsupportedDateTimeField
This class is a JUnit test to test only the UnsupportedDateTimeField class. This set of test cases exercises everything described in the Javadoc for this class.
Constructor Summary | |
---|---|
TestUnsupportedDateTimeField()
|
Method Summary | |
---|---|
protected void |
setUp()
|
static junit.framework.TestSuite |
suite()
|
void |
testAlwaysFalseReturnTypes()
As this is an unsupported date/time field, some normal methods will always return false, as they are not supported. |
void |
testDelegatedMethods()
As this is an unsupported date/time field, many normal methods are unsupported. |
void |
testDifferentDurationReturnDifferentObjects()
This test exercises the logic in UnsupportedDateTimeField.getInstance. |
void |
testMethodsThatShouldAlwaysReturnNull()
According to the JavaDocs, there are two methods that should always return null. |
void |
testNullValuesToGetInstanceThrowsException()
Passing null values into UnsupportedDateTimeField.getInstance() should throw an IllegalArguementsException |
void |
testPublicGetNameMethod()
The getName() method should return the same value as the getName() method of the DateTimeFieldType that was used to create the instance. |
void |
testToString()
The toString method should return a suitable debug message (not null). |
void |
testUnsupportedMethods()
As this is an unsupported date/time field, many normal methods are unsupported and throw an UnsupportedOperationException. |
Methods inherited from class junit.framework.TestCase |
---|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, tearDown, toString |
Methods inherited from class junit.framework.Assert |
---|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TestUnsupportedDateTimeField()
Method Detail |
---|
public static junit.framework.TestSuite suite()
protected void setUp() throws Exception
setUp
in class junit.framework.TestCase
Exception
public void testNullValuesToGetInstanceThrowsException()
public void testDifferentDurationReturnDifferentObjects()
public void testPublicGetNameMethod()
public void testAlwaysFalseReturnTypes()
public void testMethodsThatShouldAlwaysReturnNull()
public void testUnsupportedMethods()
public void testDelegatedMethods()
public void testToString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |