test/java/time/test/java/time/zone/TestFixedZoneRules.java

Print this page




  42  *    and/or other materials provided with the distribution.
  43  *
  44  *  * Neither the name of JSR-310 nor the names of its contributors
  45  *    may be used to endorse or promote products derived from this software
  46  *    without specific prior written permission.
  47  *
  48  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  49  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  50  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  51  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
  52  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  53  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  54  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  55  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  56  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  57  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  58  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  59  */
  60 package test.java.time.zone;
  61 
  62 import java.time.zone.*;
  63 
  64 import static org.testng.Assert.assertEquals;
  65 
  66 import java.time.Duration;
  67 import java.time.Instant;
  68 import java.time.LocalDateTime;
  69 import java.time.ZoneOffset;
  70 
  71 import org.testng.annotations.Test;
  72 
  73 /**
  74  * Test ZoneRules for fixed offset time-zones.
  75  */
  76 @Test
  77 public class TestFixedZoneRules {
  78 
  79     private static final ZoneOffset OFFSET_PONE = ZoneOffset.ofHours(1);
  80 
  81     private ZoneRules make(ZoneOffset offset) {
  82         return offset.getRules();


  42  *    and/or other materials provided with the distribution.
  43  *
  44  *  * Neither the name of JSR-310 nor the names of its contributors
  45  *    may be used to endorse or promote products derived from this software
  46  *    without specific prior written permission.
  47  *
  48  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  49  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  50  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  51  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
  52  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  53  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  54  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  55  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  56  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  57  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  58  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  59  */
  60 package test.java.time.zone;
  61 
  62 import java.time.zone.ZoneRules;
  63 
  64 import static org.testng.Assert.assertEquals;
  65 
  66 import java.time.Duration;
  67 import java.time.Instant;
  68 import java.time.LocalDateTime;
  69 import java.time.ZoneOffset;
  70 
  71 import org.testng.annotations.Test;
  72 
  73 /**
  74  * Test ZoneRules for fixed offset time-zones.
  75  */
  76 @Test
  77 public class TestFixedZoneRules {
  78 
  79     private static final ZoneOffset OFFSET_PONE = ZoneOffset.ofHours(1);
  80 
  81     private ZoneRules make(ZoneOffset offset) {
  82         return offset.getRules();