// Path: app/src/main/java/com/newegg/tr/dagger2prac/model/config/Config.java
// public interface Config {
// 
//     public String getUserName();
// 
//     public void setUserName(String userName);
// 
// }
// 
// Path: app/src/main/java/com/newegg/tr/dagger2prac/view/activity/SettingActivity.java
// public class SettingActivity extends BaseActivity implements SettingView, View.OnClickListener {
// 
//     @Inject
//     SettingPresenter mPresenter;
// 
//     @InjectView(R.id.settingPage_userNameTextView)
//     TextView mUserNameTextView;
// 
//     @InjectView(R.id.settingPage_changeUserNameButton)
//     TextView mChangeNameButton;
// 
//     @Override
//     protected void onCreateComponent() {
//         SettingComponent.Initializer.init(getApplication(), this).inject(this);
//     }
// 
//     @Override
//     protected void onCreate(Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
//         setContentView(R.layout.activity_setting);
//         ButterKnife.inject(this);
// 
//         mChangeNameButton.setOnClickListener(this);
//         mUserNameTextView.setOnClickListener(this);
//         updateUserName(mPresenter.getUserName());
//     }
// 
//     @Override
//     public void onClick(View v) {
// 
//         final View dialogView = getLayoutInflater().inflate(R.layout.activity_setting_dialog, null);
// 
//         final AlertDialog renameDialog = new AlertDialog.Builder(this).setTitle("Change User Name").setView(dialogView).setPositiveButton("OK", new DialogInterface.OnClickListener() {
//             @Override
//             public void onClick(DialogInterface dialog, int which) {
//                 EditText renameEditText = (EditText) dialogView.findViewById(R.id.settingPage_dialogRenameEditText);
//                 mPresenter.setUserName(renameEditText.getText().toString());
//                 dialog.dismiss();
//                 setResult(Activity.RESULT_OK);
//             }
//         }).setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
//             @Override
//             public void onClick(DialogInterface dialog, int which) {
//                 dialog.dismiss();
//             }
//         }).create();
// 
//         renameDialog.show();
// 
//     }
// 
//     @Override
//     public void updateUserName(String userName) {
//         mUserNameTextView.setText(userName);
//     }
// }


import android.test.ActivityInstrumentationTestCase2;
import com.newegg.tr.dagger2prac.model.config.Config;
import com.newegg.tr.dagger2prac.view.activity.SettingActivity;
import javax.inject.Inject;
package com.newegg.tr.dagger2prac.view;




/**
 * Created by william on 15/2/16.
 */
public class SettingTestCase extends ActivityInstrumentationTestCase2<SettingActivity> {

    @Inject
// Path: app/src/main/java/com/newegg/tr/dagger2prac/model/config/Config.java
// public interface Config {
// 
//     public String getUserName();
// 
//     public void setUserName(String userName);
// 
// }
// 
// Path: app/src/main/java/com/newegg/tr/dagger2prac/view/activity/SettingActivity.java
// public class SettingActivity extends BaseActivity implements SettingView, View.OnClickListener {
// 
//     @Inject
//     SettingPresenter mPresenter;
// 
//     @InjectView(R.id.settingPage_userNameTextView)
//     TextView mUserNameTextView;
// 
//     @InjectView(R.id.settingPage_changeUserNameButton)
//     TextView mChangeNameButton;
// 
//     @Override
//     protected void onCreateComponent() {
//         SettingComponent.Initializer.init(getApplication(), this).inject(this);
//     }
// 
//     @Override
//     protected void onCreate(Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
//         setContentView(R.layout.activity_setting);
//         ButterKnife.inject(this);
// 
//         mChangeNameButton.setOnClickListener(this);
//         mUserNameTextView.setOnClickListener(this);
//         updateUserName(mPresenter.getUserName());
//     }
// 
//     @Override
//     public void onClick(View v) {
// 
//         final View dialogView = getLayoutInflater().inflate(R.layout.activity_setting_dialog, null);
// 
//         final AlertDialog renameDialog = new AlertDialog.Builder(this).setTitle("Change User Name").setView(dialogView).setPositiveButton("OK", new DialogInterface.OnClickListener() {
//             @Override
//             public void onClick(DialogInterface dialog, int which) {
//                 EditText renameEditText = (EditText) dialogView.findViewById(R.id.settingPage_dialogRenameEditText);
//                 mPresenter.setUserName(renameEditText.getText().toString());
//                 dialog.dismiss();
//                 setResult(Activity.RESULT_OK);
//             }
//         }).setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
//             @Override
//             public void onClick(DialogInterface dialog, int which) {
//                 dialog.dismiss();
//             }
//         }).create();
// 
//         renameDialog.show();
// 
//     }
// 
//     @Override
//     public void updateUserName(String userName) {
//         mUserNameTextView.setText(userName);
//     }
// }


// Path: app/src/debug/java/com/newegg/tr/dagger2prac/view/SettingTestCase.java
import android.test.ActivityInstrumentationTestCase2;
import com.newegg.tr.dagger2prac.model.config.Config;
import com.newegg.tr.dagger2prac.view.activity.SettingActivity;
import javax.inject.Inject;

package com.newegg.tr.dagger2prac.view;




/**
 * Created by william on 15/2/16.
 */
public class SettingTestCase extends ActivityInstrumentationTestCase2<SettingActivity> {

    @Inject
    protected Config mMockConfig;