@Test(groups = "fast") public void testCalculateBCDWithTimeZoneHST() throws Exception { final DateTimeZone accountTimeZone = DateTimeZone.forID("HST"); final DateTime startDateUTC = new DateTime("2012-07-16T21:17:03.000Z", DateTimeZone.UTC); final int bcdLocal = 16; verifyBCDCalculation(accountTimeZone, startDateUTC, bcdLocal); }
@Test(groups = "fast") public void testCalculateBCDWithTimeZoneEEST() throws Exception { final DateTimeZone accountTimeZone = DateTimeZone.forID("+0300"); final DateTime startDateUTC = new DateTime("2012-07-16T21:17:03.000Z", DateTimeZone.UTC); final int bcdLocal = 17; verifyBCDCalculation(accountTimeZone, startDateUTC, bcdLocal); }
@Test(groups = "fast") public void testCalculateBCDWithTimeZoneUTC() throws Exception { final DateTimeZone accountTimeZone = DateTimeZone.UTC; final DateTime startDateUTC = new DateTime("2012-07-16T21:17:03.000Z", DateTimeZone.UTC); final int bcdLocal = 16; verifyBCDCalculation(accountTimeZone, startDateUTC, bcdLocal); }
@Test(groups = "fast") public void testCalculateBCDWithTimeZoneJST() throws Exception { final DateTimeZone accountTimeZone = DateTimeZone.forID("Asia/Tokyo"); final DateTime startDateUTC = new DateTime("2012-07-16T21:17:03.000Z", DateTimeZone.UTC); final int bcdLocal = 17; verifyBCDCalculation(accountTimeZone, startDateUTC, bcdLocal); }
@Test(groups = "fast") public void testCalculateBCDWithTimeZoneCEST() throws Exception { final DateTimeZone accountTimeZone = DateTimeZone.forID("Europe/Paris"); final DateTime startDateUTC = new DateTime("2012-07-16T21:17:03.000Z", DateTimeZone.UTC); final int bcdLocal = 16; verifyBCDCalculation(accountTimeZone, startDateUTC, bcdLocal); }
@Test(groups = "fast") public void testCalculateBCDWithSubscriptionDateNotInUTC() throws Exception { // Test to verify the computations don't rely implicitly on UTC final DateTimeZone accountTimeZone = DateTimeZone.forID("Asia/Tokyo"); final DateTime startDate = new DateTime("2012-07-16T21:17:03.000Z", DateTimeZone.forID("HST")); final int bcdLocal = 17; verifyBCDCalculation(accountTimeZone, startDate, bcdLocal); }