亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? cronexpressiontest.java

?? Java中非常實用流控制工具
?? JAVA
字號:
/* 
 * Copyright 2004-2006 OpenSymphony 
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not 
 * use this file except in compliance with the License. You may obtain a copy 
 * of the License at 
 * 
 *   http://www.apache.org/licenses/LICENSE-2.0 
 *   
 * Unless required by applicable law or agreed to in writing, software 
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 
 * License for the specific language governing permissions and limitations 
 * under the License.
 */
package org.quartz;

import java.io.*;
import java.text.ParseException;
import java.util.Calendar;
import java.util.Date;
import java.util.TimeZone;

public class CronExpressionTest extends SerializationTestSupport {
    private static final String[] VERSIONS = new String[] {"1.5.2"};

    private static final TimeZone EST_TIME_ZONE = TimeZone.getTimeZone("US/Eastern"); 

    /**
     * Get the object to serialize when generating serialized file for future
     * tests, and against which to validate deserialized object.
     */
    protected Object getTargetObject() throws ParseException {
        CronExpression cronExpression = new CronExpression("0 15 10 * * ? 2005");
        cronExpression.setTimeZone(EST_TIME_ZONE);
        
        return cronExpression;
    }
    
    /**
     * Get the Quartz versions for which we should verify
     * serialization backwards compatibility.
     */
    protected String[] getVersions() {
        return VERSIONS;
    }
    
    /**
     * Verify that the target object and the object we just deserialized 
     * match.
     */
    protected void verifyMatch(Object target, Object deserialized) {
        CronExpression targetCronExpression = (CronExpression)target;
        CronExpression deserializedCronExpression = (CronExpression)deserialized;
        
        assertNotNull(deserializedCronExpression);
        assertEquals(targetCronExpression.getCronExpression(), deserializedCronExpression.getCronExpression());
        assertEquals(targetCronExpression.getTimeZone(), deserializedCronExpression.getTimeZone());
    }
    
    /*
     * Test method for 'org.quartz.CronExpression.isSatisfiedBy(Date)'.
     */
    public void testIsSatisfiedBy() throws Exception {
        CronExpression cronExpression = new CronExpression("0 15 10 * * ? 2005");
        
        Calendar cal = Calendar.getInstance();
        
        cal.set(2005, Calendar.JUNE, 1, 10, 15, 0);
        assertTrue(cronExpression.isSatisfiedBy(cal.getTime()));
        
        cal.set(Calendar.YEAR, 2006);
        assertFalse(cronExpression.isSatisfiedBy(cal.getTime()));

        cal = Calendar.getInstance();
        cal.set(2005, Calendar.JUNE, 1, 10, 16, 0);
        assertFalse(cronExpression.isSatisfiedBy(cal.getTime()));

        cal = Calendar.getInstance();
        cal.set(2005, Calendar.JUNE, 1, 10, 14, 0);
        assertFalse(cronExpression.isSatisfiedBy(cal.getTime()));
    }

    /*
     * QUARTZ-571: Showing that expressions with months correctly serialize.
     */
    public void testQuartz571() throws Exception {
        CronExpression cronExpression = new CronExpression("19 15 10 4 Apr ? ");

        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        ObjectOutputStream oos = new ObjectOutputStream(baos);
        oos.writeObject(cronExpression);
        ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
        ObjectInputStream ois = new ObjectInputStream(bais);
        CronExpression newExpression = (CronExpression) ois.readObject();

        assertEquals(newExpression.getCronExpression(), cronExpression.getCronExpression());

        // if broken, this will throw an exception
        newExpression.getNextValidTimeAfter(new Date());
    }

    /*
     * QUARTZ-574: Showing that storeExpressionVals correctly calculates the month number
     */
    public void testQuartz574() {
        try {
            CronExpression cronExpression = new CronExpression("* * * * Foo ? ");
            fail("Expected ParseException did not fire for non-existent month");
        } catch(ParseException pe) {
            assertTrue("Incorrect ParseException thrown", 
                pe.getMessage().startsWith("Invalid Month value:"));
        }

        try {
            CronExpression cronExpression = new CronExpression("* * * * Jan-Foo ? ");
            fail("Expected ParseException did not fire for non-existent month");
        } catch(ParseException pe) {
            assertTrue("Incorrect ParseException thrown", 
                pe.getMessage().startsWith("Invalid Month value:"));
        }
    }

    public void testQuartz621() {
        try {
            CronExpression cronExpression = new CronExpression("0 0 * * * *");
            fail("Expected ParseException did not fire for wildcard day-of-month and day-of-week");
        } catch(ParseException pe) {
            assertTrue("Incorrect ParseException thrown", 
                pe.getMessage().startsWith("Support for specifying both a day-of-week AND a day-of-month parameter is not implemented."));
        }
        try {
            CronExpression cronExpression = new CronExpression("0 0 * 4 * *");
            fail("Expected ParseException did not fire for specified day-of-month and wildcard day-of-week");
        } catch(ParseException pe) {
            assertTrue("Incorrect ParseException thrown", 
                pe.getMessage().startsWith("Support for specifying both a day-of-week AND a day-of-month parameter is not implemented."));
        }
        try {
            CronExpression cronExpression = new CronExpression("0 0 * * * 4");
            fail("Expected ParseException did not fire for wildcard day-of-month and specified day-of-week");
        } catch(ParseException pe) {
            assertTrue("Incorrect ParseException thrown", 
                pe.getMessage().startsWith("Support for specifying both a day-of-week AND a day-of-month parameter is not implemented."));
        }
    }

    public void testQuartz640() throws ParseException {
        try {
            CronExpression cronExpression = new CronExpression("0 43 9 1,5,29,L * ?");
            fail("Expected ParseException did not fire for L combined with other days of the month");
        } catch(ParseException pe) {
            assertTrue("Incorrect ParseException thrown", 
                pe.getMessage().startsWith("Support for specifying 'L' and 'LW' with other days of the month is not implemented"));
        }
        try {
            CronExpression cronExpression = new CronExpression("0 43 9 ? * SAT,SUN,L");
            fail("Expected ParseException did not fire for L combined with other days of the week");
        } catch(ParseException pe) {
            assertTrue("Incorrect ParseException thrown", 
                pe.getMessage().startsWith("Support for specifying 'L' with other days of the week is not implemented"));
        }
        try {
            CronExpression cronExpression = new CronExpression("0 43 9 ? * 6,7,L");
            fail("Expected ParseException did not fire for L combined with other days of the week");
        } catch(ParseException pe) {
            assertTrue("Incorrect ParseException thrown", 
                pe.getMessage().startsWith("Support for specifying 'L' with other days of the week is not implemented"));
        }
        try {
            CronExpression cronExpression = new CronExpression("0 43 9 ? * 5L");
        } catch(ParseException pe) {
            fail("Unexpected ParseException thrown for supported '5L' expression.");
        }
    }

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
狠狠色丁香婷婷综合| 综合网在线视频| 91福利小视频| 成人av资源在线| 国产成人一级电影| 国产美女精品一区二区三区| 毛片基地黄久久久久久天堂| 天涯成人国产亚洲精品一区av| 亚洲一区二区av电影| 亚洲人成伊人成综合网小说| 免费成人美女在线观看.| 五月开心婷婷久久| 亚洲成年人影院| 樱桃视频在线观看一区| 亚洲另类在线制服丝袜| 丰满少妇久久久久久久| 欧美日韩免费视频| 另类小说一区二区三区| 免费三级欧美电影| 国产一区二区三区在线看麻豆| 激情小说欧美图片| 国产精品一区二区黑丝| 99国产精品久久久久| 91国偷自产一区二区三区成为亚洲经典 | 一本大道av一区二区在线播放| 成人av在线播放网址| 色呦呦国产精品| 欧美疯狂做受xxxx富婆| 精品一区二区三区影院在线午夜 | 99久免费精品视频在线观看| 91丝袜高跟美女视频| 欧美日韩不卡视频| 欧美电影免费观看高清完整版在线 | 久久狠狠亚洲综合| 国产精品一区二区在线观看网站 | 美女网站色91| 成人亚洲精品久久久久软件| 在线观看亚洲精品视频| 欧美刺激午夜性久久久久久久| 久久久久久电影| 最新日韩av在线| 麻豆精品视频在线观看| 91日韩在线专区| 精品国产麻豆免费人成网站| 国产福利电影一区二区三区| 色婷婷综合久久久久中文| 在线播放一区二区三区| 国产精品久久久久影院| 日日夜夜免费精品| 99视频一区二区三区| 91精品中文字幕一区二区三区| 中文字幕av资源一区| 日韩福利电影在线| 91网站最新地址| 欧美国产激情一区二区三区蜜月| 亚洲激情校园春色| 国产精品12区| 欧美成人性战久久| 香蕉成人啪国产精品视频综合网| 国产综合久久久久久久久久久久 | 亚洲乱码国产乱码精品精的特点| 九九九精品视频| 777午夜精品免费视频| 国产精品动漫网站| 激情丁香综合五月| 欧美日本国产一区| 樱桃视频在线观看一区| av影院午夜一区| 欧美国产激情一区二区三区蜜月| 激情欧美一区二区| 日韩欧美一区二区视频| 丝袜诱惑亚洲看片| 欧美另类videos死尸| 一区二区三区高清| 色老汉一区二区三区| 亚洲人成影院在线观看| 一本色道综合亚洲| 亚洲少妇中出一区| 91免费国产在线| 亚洲精品一卡二卡| 色噜噜久久综合| 一区二区国产视频| 欧美视频一区二区三区四区| 亚洲精品免费在线播放| 欧美在线观看18| 性久久久久久久| 欧美性大战久久| 日韩欧美一区二区三区在线| 久久国产精品99久久人人澡| 精品免费一区二区三区| 国产一区在线不卡| 国产精品系列在线| 亚洲精品一区二区三区99| 韩国一区二区在线观看| 欧美大片免费久久精品三p| 国产女主播在线一区二区| 国产一区二区三区精品视频| 久久综合色播五月| 国产精品一二三在| 依依成人综合视频| 91精品国产综合久久精品图片| 蜜桃精品在线观看| 国产视频一区二区在线观看| 99久精品国产| 亚洲福中文字幕伊人影院| 日韩免费成人网| www.欧美色图| 日韩精品一级中文字幕精品视频免费观看 | 久久影院午夜片一区| 国产a级毛片一区| 一区二区欧美视频| 日韩网站在线看片你懂的| 国产 欧美在线| 亚洲成人免费视频| 久久久777精品电影网影网| 91视频观看免费| 美女国产一区二区| 成人欧美一区二区三区白人| 欧美高清视频一二三区| 成人app在线观看| 日本三级亚洲精品| 国产精品久久久久久久浪潮网站| 欧美日韩亚洲综合在线| 国产91精品久久久久久久网曝门| 一卡二卡欧美日韩| 国产欧美日韩综合精品一区二区| 欧美三级三级三级| eeuss影院一区二区三区 | 精品亚洲成a人在线观看| 亚洲免费毛片网站| 国产日产欧美一区二区视频| 欧美日韩一区二区三区四区 | 精品国产乱码久久久久久久| 欧美在线不卡视频| 成人18视频在线播放| 精品一区二区三区不卡| 亚洲午夜电影在线观看| 中文字幕在线一区免费| ww亚洲ww在线观看国产| 欧美一区二区三区免费在线看| 91在线看国产| 成人av一区二区三区| 国产精品一级片在线观看| 精品午夜一区二区三区在线观看| 亚洲18影院在线观看| 亚洲午夜在线视频| 亚洲福利电影网| 一区二区三区在线播| 亚洲男人的天堂在线aⅴ视频| 欧美国产综合色视频| 亚洲精品在线一区二区| 日韩精品一区国产麻豆| 日韩欧美一区中文| 日韩精品在线网站| 欧美xxxxxxxx| 精品国产乱码久久久久久夜甘婷婷 | 国产精品456露脸| 国产乱码精品一区二区三| 国产一区在线观看视频| 国产精品1024| 99久久久久久99| 91女神在线视频| 国模套图日韩精品一区二区| 天堂成人免费av电影一区| 欧美a一区二区| 久久国产综合精品| 国产高清亚洲一区| 成人小视频免费观看| 日本韩国欧美在线| 欧美日韩成人综合天天影院| 在线播放中文字幕一区| 精品国产乱码久久久久久浪潮| 国产欧美日韩另类一区| 自拍偷在线精品自拍偷无码专区| 亚洲综合久久久| 日韩精品高清不卡| 国产盗摄一区二区三区| 一本在线高清不卡dvd| 欧美日韩国产bt| 久久青草欧美一区二区三区| 中文字幕精品一区二区三区精品| 精品一区二区三区日韩| 亚洲视频中文字幕| 日韩高清在线不卡| 99在线热播精品免费| 欧美精品粉嫩高潮一区二区| 精品99999| 亚洲欧美成aⅴ人在线观看| 日韩av电影天堂| 成人激情开心网| 在线不卡一区二区| 国产精品久久久久久久久久免费看 | 欧美在线观看你懂的| 精品国产乱码久久久久久浪潮| 亚洲女与黑人做爰| 国产一区91精品张津瑜| 欧美午夜不卡视频| 欧美激情艳妇裸体舞| 国产午夜久久久久| 18成人在线观看|