Package org.apache.axis.types

Examples of org.apache.axis.types.YearMonth


    /**
     * Run a failure test.  values should be invalid.
     */
    private void runFailTest(int year, int month, String tz) throws Exception {
        YearMonth oYearMonth = null;
        try {
            oYearMonth = new YearMonth(year, month, tz);
        }
        catch (Exception e) { // catch the validation exception
        }
        // object is not instantiated on bad data value
        assertNull("validation restriction failed [ year=" +
View Full Code Here


                String.valueOf(year) + ",month=" + String.valueOf(month) +
                   ",tz=" + tz + "]. did not restrict bad value.", oYearMonth);
    }

    private void runFailTest(String source) throws Exception {
        YearMonth oYearMonth = null;
        try {
            oYearMonth = new YearMonth(source);
        }
        catch (Exception e) { // catch the validation exception
        }
        // object is not instantiated on bad data value
        assertNull("validation restriction failed [ " + source +
View Full Code Here

    /**
     * Run a successful test.  values should be valid.
     */
    private void runPassTest(int year, int month, String tz) throws Exception {
        YearMonth oYearMonth = null;
        try {
            oYearMonth = new YearMonth(year, month, tz);
        }
        catch (Exception e) { // catch the validation exception
            assertTrue("Validation exception thrown on valid input", false);
        }
        assertEquals("YearMonth year not equal", year, oYearMonth.getYear());
        assertEquals("YearMonth month not equal", month, oYearMonth.getMonth());
        assertEquals("YearMonth timezone not equal", tz, oYearMonth.getTimezone());
    }
View Full Code Here

        assertEquals("YearMonth month not equal", month, oYearMonth.getMonth());
        assertEquals("YearMonth timezone not equal", tz, oYearMonth.getTimezone());
    }
   
    private void runPassTest(String source) throws Exception {
        YearMonth oYearMonth = null;
        try {
            oYearMonth = new YearMonth(source);
        }
        catch (Exception e) { // catch the validation exception
            assertTrue("Validation exception thrown on valid input", false);
        }
        assertEquals("YearMonth.toString() not equal", source, oYearMonth.toString());
    }
View Full Code Here

        deserialize("<result xsi:type=\"soapenc:boolean\" xsi:nil=\"true\" />",
                    null);
    }

    public void testYearMonth() throws Exception {
        org.apache.axis.types.YearMonth ym = new YearMonth(2002, 8);
        deserialize("<result xsi:type=\"xsd:gYearMonth\">2002-08</result>",
                     ym);
    }
View Full Code Here

    /**
     * Run a failure test.  values should be invalid.
     */
    private void runFailTest(int year, int month, String tz) throws Exception {
        YearMonth oYearMonth = null;
        try {
            oYearMonth = new YearMonth(year, month, tz);
        }
        catch (Exception e) { // catch the validation exception
        }
        // object is not instantiated on bad data value
        assertNull("validation restriction failed [ year=" +
View Full Code Here

                String.valueOf(year) + ",month=" + String.valueOf(month) +
                   ",tz=" + tz + "]. did not restrict bad value.", oYearMonth);
    }

    private void runFailTest(String source) throws Exception {
        YearMonth oYearMonth = null;
        try {
            oYearMonth = new YearMonth(source);
        }
        catch (Exception e) { // catch the validation exception
        }
        // object is not instantiated on bad data value
        assertNull("validation restriction failed [ " + source +
View Full Code Here

    /**
     * Run a successful test.  values should be valid.
     */
    private void runPassTest(int year, int month, String tz) throws Exception {
        YearMonth oYearMonth = null;
        try {
            oYearMonth = new YearMonth(year, month, tz);
        }
        catch (Exception e) { // catch the validation exception
            assertTrue("Validation exception thrown on valid input", false);
        }
        assertEquals("YearMonth year not equal", year, oYearMonth.getYear());
        assertEquals("YearMonth month not equal", month, oYearMonth.getMonth());
        assertEquals("YearMonth timezone not equal", tz, oYearMonth.getTimezone());
    }
View Full Code Here

        assertEquals("YearMonth month not equal", month, oYearMonth.getMonth());
        assertEquals("YearMonth timezone not equal", tz, oYearMonth.getTimezone());
    }
   
    private void runPassTest(String source) throws Exception {
        YearMonth oYearMonth = null;
        try {
            oYearMonth = new YearMonth(source);
        }
        catch (Exception e) { // catch the validation exception
            assertTrue("Validation exception thrown on valid input", false);
        }
        assertEquals("YearMonth.toString() not equal", source, oYearMonth.toString());
    }
View Full Code Here

                    new NegativeInteger("-1"),
                    new URI("urn:this-is-a-test"),
                    new Year(1995),
                    new Month(7),
                    new Day(13),
                    new YearMonth(2002, 8),
                    new MonthDay(8, 26)
                    );
        }
        catch (RemoteException re) {
            re.printStackTrace();
View Full Code Here

TOP

Related Classes of org.apache.axis.types.YearMonth

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.