Package com.everbox4j

Source Code of com.everbox4j.EverboxAPITest

package com.everbox4j;

import static org.junit.Assert.*;

import java.io.File;
import java.util.ArrayList;
import java.util.List;

import org.junit.Test;
import org.nutz.json.Json;
import org.nutz.lang.Files;

import com.everbox4j.bean.EverBoxObject;

/**
*
* @author wendal
*/
public class EverboxAPITest {

  @Test
  public void testGet() {
//    fail("Not yet implemented");
  }

  @Test
  public void testDownload() {
//    fail("Not yet implemented");
  }

  @Test
  public void testUpload() {
//    fail("Not yet implemented");
  }

  @Test
  public void testMkidrRemote() {
//    fail("Not yet implemented");
  }

  @Test
  public void testDeleteRemote() {
//    fail("Not yet implemented");
  }

  @Test
  public void testCountDirNeedCreate() {
//    fail("Not yet implemented");
  }

  @Test
  public void testLogin() {
//    fail("Not yet implemented");
  }

  @Test
  public void testPing() {
//    fail("Not yet implemented");
  }

  @Test
  public void testCloneEverboxObject() {
//    fail("Not yet implemented");
  }

  @Test
  public void testCompareEverboxObject() throws Throwable{
    Files.deleteDir(new File("./tmp"));
    EverboxConfig.getP().put("rootpath", "./tmp");
    Files.createDirIfNoExists("./tmp");
    Files.createDirIfNoExists("./tmp/a/b/c");
    Files.createDirIfNoExists("./tmp/a/b/e/C/c/F");
    Files.createFileIfNoExists("./tmp/a/b/c/D.txt");
   
    EverBoxObject old = new EverBoxObject();
    old.setPath("/home");
    EverboxAPI.listLocal(old);

    EverBoxObject newOne = new EverBoxObject();
    newOne.setPath("/home");
    Files.createDirIfNoExists("./tmp/a/f/c");
    Files.createFileIfNoExists("./tmp/a/b/c/F.txt");
    Files.deleteDir(new File("./tmp/a/b/e"));
    Files.deleteFile(new File("./tmp/a/b/c/D.txt"));
    Files.createFileIfNoExists("./tmp/a/b/c/D.txt");
    EverboxAPI.listLocal(newOne);
   
    List<EverboxModify> mList = new ArrayList<EverboxModify>();
    EverboxAPI.compareEverboxObject(old, newOne, mList);
//    System.out.println(Json.toJson(mList));
  }

}
TOP

Related Classes of com.everbox4j.EverboxAPITest

TOP
Copyright © 2018 www.massapi.com. 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.