SFDC_04(system.debug();)

有些类我们要看他的返回结果。那么就可以用下面的办法。

点击wndow——Show View——other然后如图所示

 

 

Active是要测试的这个类所在的工程,log category是默认的。

页面三部分组成,1写测试方法的地方。2 测试过程。3测试结果。常用system。debug();来显示测试的结果;

 

下面是我测试的具体的类,因为

uList.size()==0
所以返回值为null就显示出来了。
public with sharing class CL_00_action {
    public String getId{set;get;}
    public list<A_NO_1__c > uList{set;get;}
    public String println(){
        String a = 'hello';
        String b = 'today';
         String c = a +' '+ b;
         return c;
    }
    public list<A_NO_1__c> selectUser(){
        uList = [ SELECT Id, Name FROM A_NO_1__c  where Id =:getId ];
        if(uList.size()==0){
            return  null;
        }
        return uList;
    }
           
}

 

posted @ 2016-06-14 15:28  诸葛四郎  阅读(335)  评论(0编辑  收藏  举报