Commit 6417e3fa authored by Robert Hitt's avatar Robert Hitt
Browse files

Changed some function calls or something

parent 58b878a9
......@@ -42,7 +42,7 @@ public class DetailActivity extends AppCompatActivity implements FacilityView{
// Set up Presenter
mPresenter = new FacilityPresenter();
mPresenter.attachView(this, mFacility);
mPresenter.attachView(this);
// Set up layout
ButterKnife.bind(this);
......
......@@ -93,7 +93,7 @@ public class FacilityListAdapter extends
// Set up presenter
mPresenter = new FacilityPresenter();
mPresenter.attachView(this, data);
mPresenter.attachView(this);
}
// transitions to the facility's detail view
......
......@@ -19,7 +19,7 @@ public class FacilityPresenter {
private FacilityView mFacilityView;
public void attachView(FacilityView view, Facility facility) {
public void attachView(FacilityView view) {
mFacilityView = view;
}
......
package srct.whatsopen;
import android.content.Context;
import android.support.v7.app.AppCompatActivity;
import org.junit.Before;
import org.junit.Test;
......@@ -9,6 +12,7 @@ import io.realm.RealmList;
import srct.whatsopen.model.Facility;
import srct.whatsopen.model.MainSchedule;
import srct.whatsopen.model.OpenTimes;
import srct.whatsopen.ui.FacilityView;
import srct.whatsopen.ui.presenters.FacilityPresenter;
import static org.junit.Assert.*;
......@@ -91,4 +95,16 @@ public class FacilityPresenterUnitTest {
assertEquals("No schedule available", schedule);
}
public class TestFacilityView extends AppCompatActivity implements FacilityView {
@Override
public Context getContext() {
return this;
}
@Override
public void changeFavoriteIcon(boolean favoriteStatus) {
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment