This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DealPresenterTest { | |
@Rule public MockitoRule mockitoRule = MockitoJUnit.rule(); | |
@Rule public ToothPickRule toothPickRule = new ToothPickRule(this, “DealPresenter”); | |
@Mock DealUtil dealUtil; | |
@Mock DealApiClient dealApiClient; | |
@Mock WishlistManager wishlistManager; | |
@Inject DealPresenter dealPresenterUnderTest; | |
@Before |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DealPresenterTest { | |
@Rule public MockitoRule mockitoRule = MockitoJUnit.rule(); | |
@Mock DealUtil dealUtil; | |
@Mock DealApiClient dealApiClient; | |
@Mock WishlistManager wishlistManager; | |
private DealViewStateModel dealViewStateModel = new DealViewStateModel(); | |
private DealPresenter dealPresenterUnderTest; | |
@Before |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DealPresenter { | |
@VisibleForTesting Deal deal; | |
@Inject DealUtil dealUtil; | |
@Inject DealApiClient dealApiClient; | |
@Inject DealViewStateModel dealViewStateModel; | |
@Inject WishlistManager wishlistManager; | |
// We do not need the constructor anymore | |
... | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DealPresenterTest { | |
private DealUtil dealUtil; | |
private DealApiClient dealApiClient; | |
private WishlistManager wishlistManager; | |
private DealViewStateModel dealViewStateModel = new DealViewStateModel(); | |
private DealPresenter dealPresenterUnderTest; | |
@Before | |
public void setUp() { | |
dealUtil = mock(DealUtil.class); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DealPresenter { | |
@VisibleForTesting Deal deal; | |
private DealUtil dealUtil; | |
private DealApiClient dealApiClient; | |
private WishlistManager wishlistManager; | |
private DealViewStateModel dealViewStateModel; | |
public DealPresenter(DealUtil dealUtil, DealApiclient dealApiClient, WishlistManager wishlistManager, DealViewStateModel dealViewStateModel) { | |
this.dealUtil = dealUtil; | |
this.dealApiClient = dealApiClient; |