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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? testmoverename.java

?? cms是開源的框架
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/*
 * File   : $Source: /usr/local/cvs/opencms/test/org/opencms/file/TestMoveRename.java,v $
 * Date   : $Date: 2005/06/27 23:22:09 $
 * Version: $Revision: 1.16 $
 *
 * This library is part of OpenCms -
 * the Open Source Content Mananagement System
 *
 * Copyright (c) 2005 Alkacon Software GmbH (http://www.alkacon.com)
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * For further information about Alkacon Software GmbH, please see the
 * company website: http://www.alkacon.com
 *
 * For further information about OpenCms, please see the
 * project website: http://www.opencms.org
 * 
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
 
package org.opencms.file;

import org.opencms.file.types.CmsResourceTypeFolder;
import org.opencms.file.types.CmsResourceTypePlain;
import org.opencms.lock.CmsLock;
import org.opencms.test.OpenCmsTestCase;
import org.opencms.test.OpenCmsTestProperties;
import org.opencms.test.OpenCmsTestResourceFilter;

import junit.extensions.TestSetup;
import junit.framework.Test;
import junit.framework.TestSuite;

/**
 * Unit tests for move/reanme operation.<p>
 * 
 * @author Alexander Kandzior 
 * 
 * @version $Revision: 1.16 $
 */
public class TestMoveRename extends OpenCmsTestCase {
  
    /**
     * Default JUnit constructor.<p>
     * 
     * @param arg0 JUnit parameters
     */    
    public TestMoveRename(String arg0) {
        super(arg0);
    }
    
    /**
     * Test suite for this test class.<p>
     * 
     * @return the test suite
     */
    public static Test suite() {
        OpenCmsTestProperties.initialize(org.opencms.test.AllTests.TEST_PROPERTIES_PATH);
        
        TestSuite suite = new TestSuite();
        suite.setName(TestMoveRename.class.getName());
                
        suite.addTest(new TestMoveRename("testMoveSingleResource"));
        suite.addTest(new TestMoveRename("testMoveSingleNewResource"));
        suite.addTest(new TestMoveRename("testMultipleMoveResource"));
        suite.addTest(new TestMoveRename("testRenameNewFolder"));
        suite.addTest(new TestMoveRename("testMoveFolderToOwnSubfolder"));
        suite.addTest(new TestMoveRename("testRenameFileUpperLowerCase"));
        suite.addTest(new TestMoveRename("testRenameFolderUpperLowerCase"));
                
        TestSetup wrapper = new TestSetup(suite) {
            
            protected void setUp() {
                setupOpenCms("simpletest", "/sites/default/");
            }
            
            protected void tearDown() {
                removeOpenCms();
            }
        };
        
        return wrapper;
    }     
    
    
    /**
     * Tests a "multiple move" on a resource.<p>
     * 
     * @throws Throwable if something goes wrong
     */    
    public void testMultipleMoveResource() throws Throwable {
        
        CmsObject cms = getCmsObject();
        echo("Testing multiple move of a resource");
        
        // switch to the root context
        cms.getRequestContext().setSiteRoot("/");
        
        String source = "/sites/default/folder1/page1.html";
        String destination1 = "/sites/default/folder1/page1_move.html";
        String destination2 = "/page1_move.html";

        storeResources(cms, source);    
        
        cms.lockResource(source);        
        cms.moveResource(source, destination1);                
        cms.moveResource(destination1, destination2);
        
        // source resource:
        
        // project must be current project
        assertProject(cms, source, cms.getRequestContext().currentProject());
        // state must be "deelted"
        assertState(cms, source, CmsResource.STATE_DELETED);
        // assert lock state
        assertLock(cms, source, CmsLock.TYPE_SHARED_EXCLUSIVE);
        // "internal" property must have been added
        assertPropertyNew(cms, source, new CmsProperty(CmsPropertyDefinition.PROPERTY_INTERNAL, 
            String.valueOf(cms.getRequestContext().currentProject().getId()), null));
        // one sibling must have been added
        assertSiblingCountIncremented(cms, source, 1);
        // now assert the filter for the rest of the attributes        
        assertFilter(cms, source, OpenCmsTestResourceFilter.FILTER_MOVE_SOURCE);   
        
        // destination resource
        
        // project must be current project
        assertProject(cms, destination2, cms.getRequestContext().currentProject());
        // state must be "new"
        assertState(cms, destination2, CmsResource.STATE_NEW);
        // assert lock state
        assertLock(cms, destination2, CmsLock.TYPE_EXCLUSIVE);
        // set filter mapping
        setMapping(destination2, source);
        // one sibling must have been added
        assertSiblingCountIncremented(cms, destination2, 1);        
        // now assert the filter for the rest of the attributes        
        assertFilter(cms, destination2, OpenCmsTestResourceFilter.FILTER_MOVE_DESTINATION);    
        
        
        // just for fun try to undo changes on the source resource
        resetMapping();
        cms.changeLock(source);
        assertLock(cms, source, CmsLock.TYPE_EXCLUSIVE);
        assertLock(cms, destination2, CmsLock.TYPE_SHARED_EXCLUSIVE);        
        cms.undoChanges(source, false);        
        assertFilter(cms, source, OpenCmsTestResourceFilter.FILTER_EXISTING_SIBLING);
    }
    
    /**
     * Tests the "move single resource" operation.<p>
     * 
     * @throws Throwable if something goes wrong
     */
    public void testMoveSingleResource() throws Throwable {

        CmsObject cms = getCmsObject();     
        echo("Testing move of a file");
        
        String source = "/folder1/index.html";
        String destination = "/folder1/index_move.html";

        storeResources(cms, source);        
        
        cms.lockResource(source);
        cms.moveResource(source, destination);     
                
        // source resource must still be available if reading with "include deleted" filter
        cms.readResource(source, CmsResourceFilter.ALL);
        
        // source resource
        
        // project must be current project
        assertProject(cms, source, cms.getRequestContext().currentProject());
        // state must be "deelted"
        assertState(cms, source, CmsResource.STATE_DELETED);
        // assert lock state
        assertLock(cms, source, CmsLock.TYPE_SHARED_EXCLUSIVE);
        // "internal" property must have been added
        assertPropertyNew(cms, source, new CmsProperty(CmsPropertyDefinition.PROPERTY_INTERNAL, 
            String.valueOf(cms.getRequestContext().currentProject().getId()), null));
        // one sibling must have been added
        assertSiblingCountIncremented(cms, source, 1);
        // now assert the filter for the rest of the attributes        
        assertFilter(cms, source, OpenCmsTestResourceFilter.FILTER_MOVE_SOURCE);   
        
        // destination resource
        
        // project must be current project
        assertProject(cms, destination, cms.getRequestContext().currentProject());
        // state must be "new"
        assertState(cms, destination, CmsResource.STATE_NEW);
        // assert lock state
        assertLock(cms, destination, CmsLock.TYPE_EXCLUSIVE);
        // set filter mapping
        setMapping(destination, source);
        // one sibling must have been added
        assertSiblingCountIncremented(cms, destination, 1);        
        // now assert the filter for the rest of the attributes        
        assertFilter(cms, destination, OpenCmsTestResourceFilter.FILTER_MOVE_DESTINATION);       
    }  
    
    /**
     * Tests the "move a single new resource" operation.<p>
     * 
     * @throws Throwable if something goes wrong
     */
    public void testMoveSingleNewResource() throws Throwable {

        CmsObject cms = getCmsObject();     
        echo("Testing move of a new file");
        
        String source = "/folder1/new.html";
        String destination = "/folder1/new_move.html";

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
五月激情综合网| 精品电影一区二区| 亚洲视频免费在线| 成人午夜视频福利| 久久久久久黄色| 国产精品一区2区| 久久久www成人免费无遮挡大片 | 日本伦理一区二区| 亚洲欧美另类在线| 欧美性大战xxxxx久久久| 天天操天天色综合| 精品国产123| 成人网在线免费视频| 亚洲天堂精品视频| 欧美日韩久久久| 国模套图日韩精品一区二区| 国产人妖乱国产精品人妖| 99riav一区二区三区| 亚洲综合一区二区| 欧美一区二区在线免费播放| 精品在线你懂的| 欧美激情一区在线观看| 在线观看日韩av先锋影音电影院| 午夜国产精品影院在线观看| 欧美精品一区男女天堂| 97国产一区二区| 免费观看91视频大全| 国产精品美女久久久久久久久久久| 91麻豆国产福利精品| 日本成人在线看| 中文乱码免费一区二区| 精品1区2区3区| 国产成人精品免费一区二区| 亚洲.国产.中文慕字在线| 欧美精品一区二区三区在线播放 | 成人高清免费在线播放| 亚洲在线中文字幕| 精品国产乱码久久久久久夜甘婷婷| 成人美女在线视频| 日本不卡高清视频| 自拍偷自拍亚洲精品播放| 欧美一卡二卡三卡| 91麻豆swag| 九色综合国产一区二区三区| 亚洲黄色免费网站| 久久九九影视网| 欧美性欧美巨大黑白大战| 国产v综合v亚洲欧| 日韩电影免费在线看| 亚洲色图一区二区| 国产日韩影视精品| 日韩免费在线观看| 欧美日韩卡一卡二| 色欲综合视频天天天| 成人午夜精品一区二区三区| 久久精品72免费观看| 天堂va蜜桃一区二区三区| 国产精品久久二区二区| 久久久综合九色合综国产精品| 在线不卡免费av| 色婷婷国产精品| 99精品偷自拍| 粉嫩一区二区三区在线看| 久久机这里只有精品| 首页国产欧美久久| 亚洲午夜电影网| 亚洲欧美另类久久久精品 | 亚洲色图一区二区| 欧美极品xxx| 国产欧美一区在线| 久久嫩草精品久久久久| 欧美精品一区二区在线观看| 日韩欧美国产成人一区二区| 91精品国产全国免费观看 | 青娱乐精品在线视频| 亚洲成a人v欧美综合天堂下载| 国产精品白丝在线| 1区2区3区欧美| 中文字幕欧美一区| 日韩毛片精品高清免费| 亚洲欧洲成人精品av97| 中文字幕亚洲视频| 日韩毛片在线免费观看| 亚洲精品亚洲人成人网在线播放| 自拍偷拍国产精品| 亚洲精品国产视频| 亚洲国产成人精品视频| 日韩中文字幕1| 日韩激情视频网站| 久久爱www久久做| 国产美女久久久久| 成人av动漫网站| 97精品视频在线观看自产线路二| av中文字幕在线不卡| 99精品热视频| 色美美综合视频| 欧美日韩一级二级| 欧美成人一区二区三区片免费 | 国产一区二区三区香蕉| 国产精品资源站在线| 成人黄页毛片网站| 99久久精品免费| 欧美性色黄大片手机版| 777久久久精品| 日韩亚洲欧美在线观看| 精品福利一区二区三区免费视频| 久久影院视频免费| 亚洲欧洲国产日韩| 婷婷成人激情在线网| 久久99九九99精品| 成人avav在线| 欧美精品粉嫩高潮一区二区| 久久色视频免费观看| 亚洲丝袜美腿综合| 美女视频免费一区| 99国产麻豆精品| 欧美精品亚洲一区二区在线播放| 久久久久久久久久久久久久久99| 亚洲黄色性网站| 国产精品自在在线| 欧美中文一区二区三区| 26uuu精品一区二区三区四区在线 26uuu精品一区二区在线观看 | 91福利国产成人精品照片| 日韩女优av电影| 亚洲免费观看在线视频| 捆绑紧缚一区二区三区视频| 菠萝蜜视频在线观看一区| 制服丝袜在线91| 亚洲欧洲一区二区三区| 美女脱光内衣内裤视频久久影院| 99精品视频一区二区| 欧美va亚洲va| 亚洲一区二区在线免费观看视频| 狠狠色狠狠色综合系列| 欧美婷婷六月丁香综合色| 久久丝袜美腿综合| 日韩黄色片在线观看| 99久久免费精品| 久久天天做天天爱综合色| 日韩av中文字幕一区二区三区| 成人app网站| www国产亚洲精品久久麻豆| 亚洲成a人v欧美综合天堂下载| 盗摄精品av一区二区三区| 日韩你懂的电影在线观看| 亚洲成av人片www| 成人av在线影院| 久久久久久久国产精品影院| 免费av网站大全久久| 欧美麻豆精品久久久久久| 亚洲美女免费在线| 成人app在线观看| 欧美国产精品专区| 国产麻豆视频精品| 欧美成人a视频| 三级在线观看一区二区| 91黄色激情网站| 中文字幕一区视频| 丁香婷婷综合网| 久久久久久久久久久久电影 | 奇米777欧美一区二区| 欧美群妇大交群的观看方式| 亚洲欧洲一区二区在线播放| 国产成+人+日韩+欧美+亚洲| 久久天堂av综合合色蜜桃网| 蓝色福利精品导航| 日韩女优av电影| 精品一区二区在线视频| 日韩午夜av一区| 日本不卡一二三区黄网| 91精品国产综合久久福利| 日韩精品电影在线| 欧美日本在线视频| 天天亚洲美女在线视频| 欧美日韩一本到| 视频一区视频二区在线观看| 欧美精品vⅰdeose4hd| 日日夜夜精品免费视频| 777a∨成人精品桃花网| 日韩av一区二区在线影视| 欧美一卡二卡三卡四卡| 国产麻豆精品久久一二三| 精品国产91乱码一区二区三区 | 欧美日韩第一区日日骚| 亚洲电影一区二区| 欧美美女黄视频| 久久99精品国产麻豆婷婷| 久久免费精品国产久精品久久久久| 国产电影精品久久禁18| 国产精品三级av| 91精品福利视频| 婷婷六月综合亚洲| 精品盗摄一区二区三区| 欧美综合在线视频| 爽好多水快深点欧美视频| 日韩欧美高清dvd碟片| 久久国产精品一区二区| 国产欧美久久久精品影院| 91视视频在线观看入口直接观看www | 无码av免费一区二区三区试看|