package org.diagbot.graph;

import org.apache.commons.lang3.StringUtils;
import org.junit.Test;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 测试类
 */
public class DemoTest {
    /**
     * 测试map,如果map为空返回什么
     */
    @Test
   public void MapTest(){
        Map<String,String> k = new HashMap<>();
        if(k.size()>0){
            System.out.println("map不为空!!");
        }else {
            System.out.println("map为空!!!");
        }
        System.out.println(k.get("dd"));
   }

    /**
     * 测试list
     */
   @Test
   public void ListTest(){
       List<String> testList = null;
       testList = new ArrayList<>();
       if(testList.size()>0){
           System.out.println("list不为空!!!");
       }else {
           System.out.println("list为空!!!");
       }
   }

    /**
     * 测试string
     */
   @Test
   public void stringTest(){
       String k="";
       if(StringUtils.isNotEmpty(k)){
           System.out.println("k不为空!!!");
       }else {
           System.out.println("k为空!!!");
       }
   }
}
