< prev index next >

test/java/time/test/java/time/temporal/TestIsoWeekFields.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014,2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -119,10 +119,18 @@
     @Test
     public void test_WBY_isSupportedBy_ISO() {
         assertEquals(IsoFields.WEEK_BASED_YEAR.isSupportedBy(ThaiBuddhistDate.now()), false);
     }
 
+    @Test
+    public void test_Unit_isSupportedBy_ISO() {
+        assertEquals(IsoFields.WEEK_BASED_YEARS.isSupportedBy(LocalDate.now()),true);  
+        assertEquals(IsoFields.WEEK_BASED_YEARS.isSupportedBy(ThaiBuddhistDate.now()),false);  
+        assertEquals(IsoFields.QUARTER_YEARS.isSupportedBy(LocalDate.now()),true);  
+        assertEquals(IsoFields.QUARTER_YEARS.isSupportedBy(ThaiBuddhistDate.now()),false);  
+    }
+
     @Test(dataProvider = "fields")
     public void test_WBY_range(TemporalField weekField, TemporalField yearField) {
         assertEquals(yearField.range(), ValueRange.of(Year.MIN_VALUE, Year.MAX_VALUE));
     }
 
< prev index next >