// Path: easymvp-test/src/main/java/com/sixthsolution/easymvp/test/TestPresenter.java
// public class TestPresenter extends AbstractPresenter<View1> {
// 
//     private boolean isOnViewAttachedCalled = false;
//     private boolean isOnViewDetachedCalled = false;
//     private static int counter = 0;
//     public int count = counter++;
// 
//     @Override
//     public void onViewAttached(View1 view) {
//         super.onViewAttached(view);
//         isOnViewAttachedCalled = true;
//         Log.d("TestPresenter","onViewAttached Called");
// 
//     }
// 
//     @Override
//     public void onViewDetached() {
//         super.onViewDetached();
//         isOnViewDetachedCalled = true;
//         Log.d("TestPresenter","onViewDetached Called");
//     }
// 
//     @Override
//     public void onDestroyed() {
//         super.onDestroyed();
//         Log.d("TestPresenter","OnDestroyed Called");
//     }
// 
//     public boolean isOnViewAttachedCalled() {
//         return isOnViewAttachedCalled;
//     }
// 
//     public boolean isOnViewDetachedCalled() {
//         return isOnViewDetachedCalled;
//     }
// 
// 
// }
// 
// Path: easymvp-test/src/main/java/com/sixthsolution/easymvp/test/View1.java
// public interface View1 {
// }


import android.support.annotation.NonNull;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.sixthsolution.easymvp.test.R;
import com.sixthsolution.easymvp.test.TestPresenter;
import com.sixthsolution.easymvp.test.View1;
import easymvp.annotation.Presenter;
import easymvp.annotation.conductor.ConductorController;
import static junit.framework.Assert.assertFalse;
import static junit.framework.Assert.assertNotNull;
import static junit.framework.Assert.assertTrue;
import static org.junit.Assert.assertNull;
package com.sixthsolution.easymvp.test.conductor;



/**
 * @author Saeed Masoumi (s-masoumi@live.com)
 */

@ConductorController(presenter = TestPresenter.class)
public class TestController extends BaseController implements View1 {

    @Presenter
    TestPresenter testPresenter;

    @NonNull
    @Override
    protected View onCreateView(@NonNull LayoutInflater inflater, @NonNull ViewGroup container) {
        return inflater.inflate(R.layout.simple_fragment, container, false);
    }

    @Override
    protected void onAttach(@NonNull View view) {
        super.onAttach(view);
        assertNotNull(testPresenter);
        assertTrue(testPresenter.isOnViewAttachedCalled());
    }

    @Override
    protected void onDetach(@NonNull View view) {
        super.onDetach(view);
        assertTrue(testPresenter.isOnViewDetachedCalled());
        assertFalse(testPresenter.isViewAttached());
    }

    @Override
// Path: easymvp-test/src/main/java/com/sixthsolution/easymvp/test/TestPresenter.java
// public class TestPresenter extends AbstractPresenter<View1> {
// 
//     private boolean isOnViewAttachedCalled = false;
//     private boolean isOnViewDetachedCalled = false;
//     private static int counter = 0;
//     public int count = counter++;
// 
//     @Override
//     public void onViewAttached(View1 view) {
//         super.onViewAttached(view);
//         isOnViewAttachedCalled = true;
//         Log.d("TestPresenter","onViewAttached Called");
// 
//     }
// 
//     @Override
//     public void onViewDetached() {
//         super.onViewDetached();
//         isOnViewDetachedCalled = true;
//         Log.d("TestPresenter","onViewDetached Called");
//     }
// 
//     @Override
//     public void onDestroyed() {
//         super.onDestroyed();
//         Log.d("TestPresenter","OnDestroyed Called");
//     }
// 
//     public boolean isOnViewAttachedCalled() {
//         return isOnViewAttachedCalled;
//     }
// 
//     public boolean isOnViewDetachedCalled() {
//         return isOnViewDetachedCalled;
//     }
// 
// 
// }
// 
// Path: easymvp-test/src/main/java/com/sixthsolution/easymvp/test/View1.java
// public interface View1 {
// }


// Path: easymvp-test/src/main/java/com/sixthsolution/easymvp/test/conductor/TestController.java
import android.support.annotation.NonNull;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.sixthsolution.easymvp.test.R;
import com.sixthsolution.easymvp.test.TestPresenter;
import com.sixthsolution.easymvp.test.View1;
import easymvp.annotation.Presenter;
import easymvp.annotation.conductor.ConductorController;
import static junit.framework.Assert.assertFalse;
import static junit.framework.Assert.assertNotNull;
import static junit.framework.Assert.assertTrue;
import static org.junit.Assert.assertNull;

package com.sixthsolution.easymvp.test.conductor;



/**
 * @author Saeed Masoumi (s-masoumi@live.com)
 */

@ConductorController(presenter = TestPresenter.class)
public class TestController extends BaseController implements View1 {

    @Presenter
    TestPresenter testPresenter;

    @NonNull
    @Override
    protected View onCreateView(@NonNull LayoutInflater inflater, @NonNull ViewGroup container) {
        return inflater.inflate(R.layout.simple_fragment, container, false);
    }

    @Override
    protected void onAttach(@NonNull View view) {
        super.onAttach(view);
        assertNotNull(testPresenter);
        assertTrue(testPresenter.isOnViewAttachedCalled());
    }

    @Override
    protected void onDetach(@NonNull View view) {
        super.onDetach(view);
        assertTrue(testPresenter.isOnViewDetachedCalled());
        assertFalse(testPresenter.isViewAttached());
    }

    @Override
    protected void onDestroy() {