zoukankan      html  css  js  c++  java
  • @Test 测试

     

    package com.自定义.mall.admin.system;
    
    import java.util.List;
    import java.util.Map;
    
    import javax.annotation.Resource;
    
    import org.junit.Test;
    
    import com.zjdfwl.mall.admin.base.BaseJunit;
    import com.zjdfwl.mall.modular.sys.dao.SysDeptMapper;
    import com.zjdfwl.mall.modular.sys.model.SysDept;
    
    /**
     * 字典服务测试
     *
     * @author fengshuonan
     * @date 2017-04-27 17:05
     */
    public class DeptTest extends BaseJunit {
    
        @Resource
        SysDeptMapper deptMapper;
    
        @Test
        public void addDeptTest() {
            SysDept dept = new SysDept();
    //        dept.setFullname("测试fullname");
    //        dept.setNum(5);
    //        dept.setPid(1);
    //        dept.setSimplename("测试");
    //        dept.setTips("测试tips");
    //        dept.setVersion(1);
    //        Integer insert = deptMapper.insert(dept);
    //        assertEquals(insert, new Integer(1));
        }
    
        @Test
        public void updateTest() {
            SysDept dept = this.deptMapper.selectById(24);
            //dept.setTips("哈哈");
            //boolean flag = dept.updateById();
            //assertTrue(flag);
        }
    
        @Test
        public void deleteTest() {
            SysDept dept = this.deptMapper.selectById(24);
            //Integer integer = deptMapper.deleteById(dept);
            //assertTrue(integer > 0);
        }
    
        @Test
        public void listTest() {
            List<Map<String, Object>> list = this.deptMapper.list("总公司");
            //assertTrue(list.size() > 0);
        }
    }

     

  • 相关阅读:
    打开网页总结
    学期总结
    总结
    Sprint3
    Sprint2团队贡献分
    6.14
    典型用户与场景
    5种创建型模式
    JAVA 将接口的引用指向实现类的对象
    Java里的接口
  • 原文地址:https://www.cnblogs.com/dianzan/p/11183047.html
Copyright © 2011-2022 走看看