test/java/time/test/java/time/TestMonthDay.java

Print this page




  40  *  * Redistributions in binary form must reproduce the above copyright notice,
  41  *    this list of conditions and the following disclaimer in the documentation
  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.temporal;
  61 
  62 import static org.testng.Assert.assertEquals;
  63 import static org.testng.Assert.assertSame;
  64 import static org.testng.Assert.assertTrue;
  65 
  66 import java.time.LocalDate;
  67 import java.time.Month;
  68 import java.time.temporal.MonthDay;
  69 
  70 import org.testng.annotations.BeforeMethod;
  71 import org.testng.annotations.Test;
  72 import test.java.time.AbstractTest;
  73 
  74 /**
  75  * Test MonthDay.
  76  */
  77 @Test
  78 public class TestMonthDay extends AbstractTest {
  79 
  80     private MonthDay TEST_07_15;
  81 
  82     @BeforeMethod(groups={"tck","implementation"})
  83     public void setUp() {
  84         TEST_07_15 = MonthDay.of(7, 15);
  85     }
  86 
  87     //-----------------------------------------------------------------------
  88     @Test
  89     public void test_immutable() {
  90         assertImmutable(MonthDay.class);
  91     }
  92 




  40  *  * Redistributions in binary form must reproduce the above copyright notice,
  41  *    this list of conditions and the following disclaimer in the documentation
  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;
  61 
  62 import static org.testng.Assert.assertEquals;
  63 import static org.testng.Assert.assertSame;
  64 import static org.testng.Assert.assertTrue;
  65 
  66 import java.time.LocalDate;
  67 import java.time.Month;
  68 import java.time.MonthDay;
  69 
  70 import org.testng.annotations.BeforeMethod;
  71 import org.testng.annotations.Test;

  72 
  73 /**
  74  * Test MonthDay.
  75  */
  76 @Test
  77 public class TestMonthDay extends AbstractTest {
  78 
  79     private MonthDay TEST_07_15;
  80 
  81     @BeforeMethod(groups={"tck","implementation"})
  82     public void setUp() {
  83         TEST_07_15 = MonthDay.of(7, 15);
  84     }
  85 
  86     //-----------------------------------------------------------------------
  87     @Test
  88     public void test_immutable() {
  89         assertImmutable(MonthDay.class);
  90     }
  91