Java Code Examples for java.time.YearMonth#minus()
The following examples show how to use
java.time.YearMonth#minus() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TCKYearMonth.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
@Test(dataProvider="minus_TemporalAmount") public void test_minus_TemporalAmount(YearMonth base, TemporalAmount temporalAmount, YearMonth expectedYearMonth, Class<?> expectedEx) { if (expectedEx == null) { assertEquals(base.minus(temporalAmount), expectedYearMonth); } else { try { YearMonth result = base.minus(temporalAmount); fail(); } catch (Exception ex) { assertTrue(expectedEx.isInstance(ex)); } } }
Example 2
Source File: TCKYearMonth.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
@Test(dataProvider="minus_TemporalAmount") public void test_minus_TemporalAmount(YearMonth base, TemporalAmount temporalAmount, YearMonth expectedYearMonth, Class<?> expectedEx) { if (expectedEx == null) { assertEquals(base.minus(temporalAmount), expectedYearMonth); } else { try { YearMonth result = base.minus(temporalAmount); fail(); } catch (Exception ex) { assertTrue(expectedEx.isInstance(ex)); } } }
Example 3
Source File: TCKYearMonth.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
@Test(dataProvider="minus_long_TemporalUnit") public void test_minus_long_TemporalUnit(YearMonth base, long amount, TemporalUnit unit, YearMonth expectedYearMonth, Class<?> expectedEx) { if (expectedEx == null) { assertEquals(base.minus(amount, unit), expectedYearMonth); } else { try { YearMonth result = base.minus(amount, unit); fail(); } catch (Exception ex) { assertTrue(expectedEx.isInstance(ex)); } } }
Example 4
Source File: TCKYearMonth.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
@Test(dataProvider="minus_TemporalAmount") public void test_minus_TemporalAmount(YearMonth base, TemporalAmount temporalAmount, YearMonth expectedYearMonth, Class<?> expectedEx) { if (expectedEx == null) { assertEquals(base.minus(temporalAmount), expectedYearMonth); } else { try { YearMonth result = base.minus(temporalAmount); fail(); } catch (Exception ex) { assertTrue(expectedEx.isInstance(ex)); } } }
Example 5
Source File: TCKYearMonth.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
@Test(dataProvider="minus_TemporalAmount") public void test_minus_TemporalAmount(YearMonth base, TemporalAmount temporalAmount, YearMonth expectedYearMonth, Class<?> expectedEx) { if (expectedEx == null) { assertEquals(base.minus(temporalAmount), expectedYearMonth); } else { try { YearMonth result = base.minus(temporalAmount); fail(); } catch (Exception ex) { assertTrue(expectedEx.isInstance(ex)); } } }
Example 6
Source File: TCKYearMonth.java From hottub with GNU General Public License v2.0 | 5 votes |
@Test(dataProvider="minus_TemporalAmount") public void test_minus_TemporalAmount(YearMonth base, TemporalAmount temporalAmount, YearMonth expectedYearMonth, Class<?> expectedEx) { if (expectedEx == null) { assertEquals(base.minus(temporalAmount), expectedYearMonth); } else { try { YearMonth result = base.minus(temporalAmount); fail(); } catch (Exception ex) { assertTrue(expectedEx.isInstance(ex)); } } }
Example 7
Source File: TCKYearMonth.java From hottub with GNU General Public License v2.0 | 5 votes |
@Test(dataProvider="minus_long_TemporalUnit") public void test_minus_long_TemporalUnit(YearMonth base, long amount, TemporalUnit unit, YearMonth expectedYearMonth, Class<?> expectedEx) { if (expectedEx == null) { assertEquals(base.minus(amount, unit), expectedYearMonth); } else { try { YearMonth result = base.minus(amount, unit); fail(); } catch (Exception ex) { assertTrue(expectedEx.isInstance(ex)); } } }
Example 8
Source File: TCKYearMonth.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
@Test(dataProvider="minus_TemporalAmount") public void test_minus_TemporalAmount(YearMonth base, TemporalAmount temporalAmount, YearMonth expectedYearMonth, Class<?> expectedEx) { if (expectedEx == null) { assertEquals(base.minus(temporalAmount), expectedYearMonth); } else { try { YearMonth result = base.minus(temporalAmount); fail(); } catch (Exception ex) { assertTrue(expectedEx.isInstance(ex)); } } }
Example 9
Source File: TCKYearMonth.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
@Test(dataProvider="minus_long_TemporalUnit") public void test_minus_long_TemporalUnit(YearMonth base, long amount, TemporalUnit unit, YearMonth expectedYearMonth, Class<?> expectedEx) { if (expectedEx == null) { assertEquals(base.minus(amount, unit), expectedYearMonth); } else { try { YearMonth result = base.minus(amount, unit); fail(); } catch (Exception ex) { assertTrue(expectedEx.isInstance(ex)); } } }
Example 10
Source File: TCKYearMonth.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
@Test(dataProvider="minus_TemporalAmount") public void test_minus_TemporalAmount(YearMonth base, TemporalAmount temporalAmount, YearMonth expectedYearMonth, Class<?> expectedEx) { if (expectedEx == null) { assertEquals(base.minus(temporalAmount), expectedYearMonth); } else { try { YearMonth result = base.minus(temporalAmount); fail(); } catch (Exception ex) { assertTrue(expectedEx.isInstance(ex)); } } }
Example 11
Source File: TCKYearMonth.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
@Test(dataProvider="minus_long_TemporalUnit") public void test_minus_long_TemporalUnit(YearMonth base, long amount, TemporalUnit unit, YearMonth expectedYearMonth, Class<?> expectedEx) { if (expectedEx == null) { assertEquals(base.minus(amount, unit), expectedYearMonth); } else { try { YearMonth result = base.minus(amount, unit); fail(); } catch (Exception ex) { assertTrue(expectedEx.isInstance(ex)); } } }
Example 12
Source File: TCKYearMonth.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
@Test(dataProvider="minus_TemporalAmount") public void test_minus_TemporalAmount(YearMonth base, TemporalAmount temporalAmount, YearMonth expectedYearMonth, Class<?> expectedEx) { if (expectedEx == null) { assertEquals(base.minus(temporalAmount), expectedYearMonth); } else { try { YearMonth result = base.minus(temporalAmount); fail(); } catch (Exception ex) { assertTrue(expectedEx.isInstance(ex)); } } }
Example 13
Source File: TCKYearMonth.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
@Test(dataProvider="minus_long_TemporalUnit") public void test_minus_long_TemporalUnit(YearMonth base, long amount, TemporalUnit unit, YearMonth expectedYearMonth, Class<?> expectedEx) { if (expectedEx == null) { assertEquals(base.minus(amount, unit), expectedYearMonth); } else { try { YearMonth result = base.minus(amount, unit); fail(); } catch (Exception ex) { assertTrue(expectedEx.isInstance(ex)); } } }
Example 14
Source File: TCKYearMonth.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
@Test(dataProvider="minus_TemporalAmount") public void test_minus_TemporalAmount(YearMonth base, TemporalAmount temporalAmount, YearMonth expectedYearMonth, Class<?> expectedEx) { if (expectedEx == null) { assertEquals(base.minus(temporalAmount), expectedYearMonth); } else { try { YearMonth result = base.minus(temporalAmount); fail(); } catch (Exception ex) { assertTrue(expectedEx.isInstance(ex)); } } }
Example 15
Source File: TCKYearMonth.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
@Test(dataProvider="minus_long_TemporalUnit") public void test_minus_long_TemporalUnit(YearMonth base, long amount, TemporalUnit unit, YearMonth expectedYearMonth, Class<?> expectedEx) { if (expectedEx == null) { assertEquals(base.minus(amount, unit), expectedYearMonth); } else { try { YearMonth result = base.minus(amount, unit); fail(); } catch (Exception ex) { assertTrue(expectedEx.isInstance(ex)); } } }
Example 16
Source File: TCKYearMonth.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
@Test(dataProvider="minus_TemporalAmount") public void test_minus_TemporalAmount(YearMonth base, TemporalAmount temporalAmount, YearMonth expectedYearMonth, Class<?> expectedEx) { if (expectedEx == null) { assertEquals(base.minus(temporalAmount), expectedYearMonth); } else { try { YearMonth result = base.minus(temporalAmount); fail(); } catch (Exception ex) { assertTrue(expectedEx.isInstance(ex)); } } }
Example 17
Source File: TCKYearMonth.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
@Test(dataProvider="minus_long_TemporalUnit") public void test_minus_long_TemporalUnit(YearMonth base, long amount, TemporalUnit unit, YearMonth expectedYearMonth, Class<?> expectedEx) { if (expectedEx == null) { assertEquals(base.minus(amount, unit), expectedYearMonth); } else { try { YearMonth result = base.minus(amount, unit); fail(); } catch (Exception ex) { assertTrue(expectedEx.isInstance(ex)); } } }
Example 18
Source File: TCKYearMonth.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
@Test(dataProvider="minus_TemporalAmount") public void test_minus_TemporalAmount(YearMonth base, TemporalAmount temporalAmount, YearMonth expectedYearMonth, Class<?> expectedEx) { if (expectedEx == null) { assertEquals(base.minus(temporalAmount), expectedYearMonth); } else { try { YearMonth result = base.minus(temporalAmount); fail(); } catch (Exception ex) { assertTrue(expectedEx.isInstance(ex)); } } }
Example 19
Source File: TCKYearMonth.java From j2objc with Apache License 2.0 | 5 votes |
@Test() @UseDataProvider("data_minus_TemporalAmount") public void test_minus_TemporalAmount(YearMonth base, TemporalAmount temporalAmount, YearMonth expectedYearMonth, Class<?> expectedEx) { if (expectedEx == null) { assertEquals(base.minus(temporalAmount), expectedYearMonth); } else { try { YearMonth result = base.minus(temporalAmount); fail(); } catch (Exception ex) { assertTrue(expectedEx.isInstance(ex)); } } }
Example 20
Source File: TCKYearMonth.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
@Test(dataProvider="minus_TemporalAmount") public void test_minus_TemporalAmount(YearMonth base, TemporalAmount temporalAmount, YearMonth expectedYearMonth, Class<?> expectedEx) { if (expectedEx == null) { assertEquals(base.minus(temporalAmount), expectedYearMonth); } else { try { YearMonth result = base.minus(temporalAmount); fail(); } catch (Exception ex) { assertTrue(expectedEx.isInstance(ex)); } } }