jade.jademx.util.iso8601
Class DurationTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by jade.jademx.util.iso8601.DurationTest
All Implemented Interfaces:
junit.framework.Test

public class DurationTest
extends junit.framework.TestCase

test com.caboodlenetworks.agents.ontology.ui.AclMsgCmp

Author:
David Bernstein, Caboodle Networks, Inc.

Field Summary
private static int DAY_IN_MON
          number of days in month - ARBITRARY
private static int DAY_IN_WK
          number of days in week
private static int DAY_IN_YR
          number of days in year - ARBITRARY
private static int HR_IN_DAY
          number of hours in a day
private static int MIN_IN_HR
          number of minutes in an hour
private static int MS_IN_DAY
          number of milliseconds in a day
private static int MS_IN_SEC
          number of milliseconds in a second
private static int SEC_IN_DAY
          number of seconds in a day
private static int SEC_IN_MIN
          number of seconds in a minute
 
Constructor Summary
DurationTest()
           
 
Method Summary
static junit.framework.Test suite()
          return the implicit suite of tests
 void testAltBasic()
          try unimplemented alternative baseic format
 void testAlternative()
          test alternative format
 void testAlternativeExtended()
          test alternative extended format
 void testAlternativeWeeks()
          test alternative format for weeks
 void testAltExt()
          try unimplemented alternative extended format
 void testDurationFieldsNonWeeks()
          test non-week field init/get/set
 void testDurationFieldWeeks()
          test week field init/get/set
 void testDurationLocale()
          test locale get/set
 void testExtended()
          test alternative extended format
 void testExtendedWeeks()
          test extended format for weeks
 void testGetFraction()
          test getting fraction
 void testInitialP()
          look for initial 'P'
 void testNoField()
          try no field in string
 void testNoUnit()
          try no unit in string
 void testP1M2DT3H()
          try P1M2DT3H
 void testP1Y2D()
          test P1Y2D
 void testP1Y2M()
          test P1Y2M
 void testP1YfD()
          test P1YfD
 void testP5ST3D()
          try P5ST3D
 void testP5Y12D5D()
          try P5Y12D5D
 void testP5Y12D5S()
          try P5Y12D5S
 void testP5Y12M5D4H()
          try P5Y12M5D4H
 void testP6D()
          test P6D
 void testP6DT5H()
          test P6DT5H
 void testP8D2D()
          try P8D2D
 void testP8D2M()
          try P8D2M
 void testP8D2S()
          try P8D2S
 void testPreTFraction()
          try fraction before 'T'
 void testPT()
          try PT
 void testPT0pt5H0pt5M()
          try PT0.5H0.5M
 void testPT0S()
          Test PT0S
 void testPT2pt5M()
          try PT2.5M
 void testPT3M()
          test PT3M
 void testPT4H3M6q()
          try PT4H3M6q
 void testPT4H3M6S0()
          try PT4H3M6S0
 void testPT4H3pt5M4pt8S()
          try PT4H3.5M4.8S
 void testPT5H3H()
          test PT5H3H
 void testPT5H3S19S()
          try PT5H3S19S
 void testPT5M3M()
          test PT5M3M
 void testPT5S()
          Test PT5S
 void testPT5S3S()
          test PT5S3S
 void testPT5Y()
          try PT5Y
 void testPT7cm4S()
          Test PT7,4S
 void testPT7H2pt5M()
          try PT7H2.5M
 void testPT7M2pt5S()
          try PT7M2.5S
 void testPT7pt4S()
          Test PT7.4S
 void testPT9M()
          Test PT9M
 void testPxYT5D()
          try PxYT5D
 void testToMilliseconds()
          test toMilliseconds()
 void testToSeconds()
          test toSeconds()
 void testToString()
          test toString()
 void testToStringWeeks()
          test toString() for weeks
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MS_IN_SEC

private static final int MS_IN_SEC
number of milliseconds in a second

See Also:
Constant Field Values

SEC_IN_MIN

private static final int SEC_IN_MIN
number of seconds in a minute

See Also:
Constant Field Values

MIN_IN_HR

private static final int MIN_IN_HR
number of minutes in an hour

See Also:
Constant Field Values

HR_IN_DAY

private static final int HR_IN_DAY
number of hours in a day

See Also:
Constant Field Values

SEC_IN_DAY

private static final int SEC_IN_DAY
number of seconds in a day

See Also:
Constant Field Values

MS_IN_DAY

private static final int MS_IN_DAY
number of milliseconds in a day

See Also:
Constant Field Values

DAY_IN_WK

private static final int DAY_IN_WK
number of days in week

See Also:
Constant Field Values

DAY_IN_MON

private static final int DAY_IN_MON
number of days in month - ARBITRARY

See Also:
Constant Field Values

DAY_IN_YR

private static final int DAY_IN_YR
number of days in year - ARBITRARY

See Also:
Constant Field Values
Constructor Detail

DurationTest

public DurationTest()
Method Detail

testPT0S

public void testPT0S()
Test PT0S


testPT5S

public void testPT5S()
Test PT5S


testPT7pt4S

public void testPT7pt4S()
Test PT7.4S


testPT7cm4S

public void testPT7cm4S()
Test PT7,4S


testPT9M

public void testPT9M()
Test PT9M


testDurationLocale

public void testDurationLocale()
test locale get/set


testDurationFieldsNonWeeks

public void testDurationFieldsNonWeeks()
test non-week field init/get/set


testDurationFieldWeeks

public void testDurationFieldWeeks()
test week field init/get/set


testToString

public void testToString()
test toString()


testToStringWeeks

public void testToStringWeeks()
test toString() for weeks


testAlternative

public void testAlternative()
test alternative format


testAlternativeExtended

public void testAlternativeExtended()
test alternative extended format


testExtended

public void testExtended()
test alternative extended format


testAlternativeWeeks

public void testAlternativeWeeks()
test alternative format for weeks


testExtendedWeeks

public void testExtendedWeeks()
test extended format for weeks


testInitialP

public void testInitialP()
look for initial 'P'


testNoField

public void testNoField()
try no field in string


testPreTFraction

public void testPreTFraction()
try fraction before 'T'


testNoUnit

public void testNoUnit()
try no unit in string


testAltExt

public void testAltExt()
try unimplemented alternative extended format


testAltBasic

public void testAltBasic()
try unimplemented alternative baseic format


testPT3M

public void testPT3M()
test PT3M


testP6D

public void testP6D()
test P6D


testP5ST3D

public void testP5ST3D()
try P5ST3D


testP6DT5H

public void testP6DT5H()
test P6DT5H


testP1Y2M

public void testP1Y2M()
test P1Y2M


testP1Y2D

public void testP1Y2D()
test P1Y2D


testP8D2M

public void testP8D2M()
try P8D2M


testP8D2D

public void testP8D2D()
try P8D2D


testP8D2S

public void testP8D2S()
try P8D2S


testP5Y12D5D

public void testP5Y12D5D()
try P5Y12D5D


testP5Y12D5S

public void testP5Y12D5S()
try P5Y12D5S


testPT

public void testPT()
try PT


testPT5Y

public void testPT5Y()
try PT5Y


testPT0pt5H0pt5M

public void testPT0pt5H0pt5M()
try PT0.5H0.5M


testPT5H3S19S

public void testPT5H3S19S()
try PT5H3S19S


testPT7H2pt5M

public void testPT7H2pt5M()
try PT7H2.5M


testPT2pt5M

public void testPT2pt5M()
try PT2.5M


testPT7M2pt5S

public void testPT7M2pt5S()
try PT7M2.5S


testP5Y12M5D4H

public void testP5Y12M5D4H()
try P5Y12M5D4H


testP1M2DT3H

public void testP1M2DT3H()
try P1M2DT3H


testPT5H3H

public void testPT5H3H()
test PT5H3H


testPT5M3M

public void testPT5M3M()
test PT5M3M


testPT5S3S

public void testPT5S3S()
test PT5S3S


testP1YfD

public void testP1YfD()
test P1YfD


testPT4H3pt5M4pt8S

public void testPT4H3pt5M4pt8S()
try PT4H3.5M4.8S


testPT4H3M6q

public void testPT4H3M6q()
try PT4H3M6q


testPT4H3M6S0

public void testPT4H3M6S0()
try PT4H3M6S0


testPxYT5D

public void testPxYT5D()
try PxYT5D


testGetFraction

public void testGetFraction()
test getting fraction


testToSeconds

public void testToSeconds()
test toSeconds()


testToMilliseconds

public void testToMilliseconds()
test toMilliseconds()


suite

public static junit.framework.Test suite()
return the implicit suite of tests

Returns:
the implicit suite of tests


Copyright © 2005-2006 Caboodle Networks, Inc.
LGPL license