com.jrefinery.date.junit
Class SpreadsheetDateTests

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by com.jrefinery.date.junit.SpreadsheetDateTests
All Implemented Interfaces:
junit.framework.Test

public class SpreadsheetDateTests
extends junit.framework.TestCase

Tests for the SpreadsheetDate class.


Field Summary
protected  SerialDate Jan_1_1900
          Date representing 1 January 1900.
protected  SerialDate s2
          Date representing serial day number 2.
 
Constructor Summary
SpreadsheetDateTests(java.lang.String name)
           
 
Method Summary
protected  void setUp()
           
static junit.framework.Test suite()
           
 void test01feb2000_toSerial()
          Create a date for 01-Feb-2000: the serial number should be 36557.
 void test01Jan1900_toSerial()
          Create a date for 01-Jan-1900: the serial number should be 2.
 void test01Jan2000_toSerial()
          Create a date for 1-Jan-2000: the serial number should be 36526.
 void test01Mar1900_toSerial()
          Create a date for 01-Mar-1900: the serial number should be 61.
 void test12Nov2001_getDayOfWeek()
          12 November 2001 is a Monday.
 void test1Jan1900_getDayOfWeek()
          1 January 1900 is a Thursday.
 void test1mar2000_toSerial()
          Create a date for 1-Mar-2000: the serial number should be 36586.
 void test28Feb1900_toSerial()
          Create a date for 28-Feb-1900: the serial number should be 60.
 void test28feb2000_toSerial()
          Create a date for 28-Feb-2000: the serial number should be 36584.
 void test29feb2000_toSerial()
          Create a date for 29-Feb-2000: the serial number should be 36585.
 void test31Dec1999_toSerial()
          Create a date for 31-Dec-1999: the serial number should be 36525.
 void test31Jan2000_toSerial()
          Create a date for 31-Jan-2000: the serial number should be 36556.
 void test36584()
          Create a date for serial number 36584: it should be 28-Feb-2000.
 void test36585()
          Create a date for serial number 36585: it should be 29-Feb-2000.
 void test36586()
          Create a date for serial number 36586: it should be 1-Mar-2000.
 void test37986()
           
 void test37987()
           
 void test38352()
           
 void test38353()
           
 void testS2GetDayOfMonth()
          Day 2 is the first of the month.
 void testS2GetMonth()
          Day 2 is in January.
 void testS2GetYYYY()
          Day 2 is in 1900.
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

Jan_1_1900

protected SerialDate Jan_1_1900
Date representing 1 January 1900.


s2

protected SerialDate s2
Date representing serial day number 2.

Constructor Detail

SpreadsheetDateTests

public SpreadsheetDateTests(java.lang.String name)
Method Detail

suite

public static junit.framework.Test suite()

setUp

protected void setUp()
Overrides:
setUp in class junit.framework.TestCase

test1Jan1900_getDayOfWeek

public void test1Jan1900_getDayOfWeek()
1 January 1900 is a Thursday.


test12Nov2001_getDayOfWeek

public void test12Nov2001_getDayOfWeek()
12 November 2001 is a Monday.


testS2GetDayOfMonth

public void testS2GetDayOfMonth()
Day 2 is the first of the month.


testS2GetMonth

public void testS2GetMonth()
Day 2 is in January.


testS2GetYYYY

public void testS2GetYYYY()
Day 2 is in 1900.


test37986

public void test37986()

test37987

public void test37987()

test38352

public void test38352()

test38353

public void test38353()

test36584

public void test36584()
Create a date for serial number 36584: it should be 28-Feb-2000.


test36585

public void test36585()
Create a date for serial number 36585: it should be 29-Feb-2000.


test36586

public void test36586()
Create a date for serial number 36586: it should be 1-Mar-2000.


test01Jan1900_toSerial

public void test01Jan1900_toSerial()
Create a date for 01-Jan-1900: the serial number should be 2.


test28Feb1900_toSerial

public void test28Feb1900_toSerial()
Create a date for 28-Feb-1900: the serial number should be 60.


test01Mar1900_toSerial

public void test01Mar1900_toSerial()
Create a date for 01-Mar-1900: the serial number should be 61.


test31Dec1999_toSerial

public void test31Dec1999_toSerial()
Create a date for 31-Dec-1999: the serial number should be 36525.


test01Jan2000_toSerial

public void test01Jan2000_toSerial()
Create a date for 1-Jan-2000: the serial number should be 36526.


test31Jan2000_toSerial

public void test31Jan2000_toSerial()
Create a date for 31-Jan-2000: the serial number should be 36556.


test01feb2000_toSerial

public void test01feb2000_toSerial()
Create a date for 01-Feb-2000: the serial number should be 36557.


test28feb2000_toSerial

public void test28feb2000_toSerial()
Create a date for 28-Feb-2000: the serial number should be 36584.


test29feb2000_toSerial

public void test29feb2000_toSerial()
Create a date for 29-Feb-2000: the serial number should be 36585.


test1mar2000_toSerial

public void test1mar2000_toSerial()
Create a date for 1-Mar-2000: the serial number should be 36586.



Copyright © 2003 MBARI.

The Monterey Bay Aquarium Research Institute (MBARI) provides this documentation and code "as is", with no warranty, express or implied, of its quality or consistency. It is provided without support and without obligation on the part of MBARI to assist in its use, correction, modification, or enhancement.