Clover Coverage Report - Main Coverage Report
Coverage timestamp: ven dic 19 2014 16:47:52 EST
../../../../img/srcFileCovDistChart6.png 51% of files have more coverage
26   74   9   3,71
0   63   0,35   7
7     1,29  
1    
This report was generated with an evaluation server license. Purchase Clover or configure your license.
 
  AdService       Line # 13 26 9 54,5% 0.54545456
 
No Tests
 
1    package com.dreamcatcher.bicycle.core;
2   
3    import android.os.Bundle;
4    import android.os.Handler;
5    import android.os.Message;
6   
7    import com.dreamcatcher.bicycle.BicycleApp;
8    import com.dreamcatcher.bicycle.interfaces.IAdService;
9    import com.dreamcatcher.bicycle.util.Constants;
10    import com.uucun.adsdk.UUAppConnect;
11    import com.uucun.adsdk.UpdatePointListener;
12   
 
13    public class AdService implements IAdService, UpdatePointListener {
14    private BicycleApp mApp = BicycleApp.getInstance();
15    private Handler mHandler = null;
16    private final static int GET_POINTS_SUCCESS = 0;
17    private final static int GET_POINTS_FAILED = 1;
18   
 
19  1 toggle public AdService(){
20  1 mHandler = new Handler(){
 
21  1 toggle @Override
22    public void handleMessage(Message msg) {
23  1 switch (msg.what) {
24  1 case GET_POINTS_SUCCESS:
25  1 String currencyName = msg.getData().getString(Constants.ParcelableTag.CURRENCY_NAME);
26  1 int totalPoint = msg.getData().getInt(Constants.ParcelableTag.TOTAL_POINT);
27   
28  1 BicycleService.getInstance().getAdEventListener().onPointsUpdated(currencyName, totalPoint);
29  1 break;
30  0 case GET_POINTS_FAILED:
31  0 String error = msg.getData().getString(Constants.ParcelableTag.CURRENCY_NAME);
32  0 BicycleService.getInstance().getAdEventListener().onPointsUpdateFailed(error);
33  0 break;
34  0 default:
35  0 break;
36    }
37    }
38    };
39    }
40   
41   
 
42  1 toggle @Override
43    public void getPoints() {
44  1 UUAppConnect.getInstance(mApp).getPoints(this);
45    }
46   
 
47  0 toggle @Override
48    public void spendPoints(int point) {
49  0 UUAppConnect.getInstance(mApp).spendPoints(point, this);
50    }
51   
 
52  0 toggle @Override
53    public void awardPoint(int point) {
54    }
55   
 
56  0 toggle @Override
57    public void onError(String error) {
58  0 Message msg = Message.obtain();
59  0 Bundle data = new Bundle();
60  0 data.putString(Constants.ParcelableTag.GET_POINT_ERROR_MSG, error);
61  0 msg.setData(data);
62  0 mHandler.sendMessage(msg);
63    }
64   
 
65  1 toggle @Override
66    public void onSuccess(String currencyName, int totalPoint) {
67  1 Message msg = Message.obtain();
68  1 Bundle data = new Bundle();
69  1 data.putString(Constants.ParcelableTag.CURRENCY_NAME, currencyName);
70  1 data.putInt(Constants.ParcelableTag.TOTAL_POINT, totalPoint);
71  1 msg.setData(data);
72  1 mHandler.sendMessage(msg);
73    }
74    }