Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ enum FailReason {
}

interface Callback {
void onGetContactsSucceeded(List<ContactSchema> cartItems);
void onGetContactsSucceeded(List<ContactSchema> contactSchemas);
void onGetContactsFailed(FailReason failReason);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,6 @@ public void setup() throws Exception {
success();
}

private List<CartItemSchema> getCartItemSchemes() {
List<CartItemSchema> schemas = new ArrayList<>();
schemas.add(new CartItemSchema(ID, TITLE, DESCRIPTION, PRICE));
return schemas;
}

@Test
public void fetchCartItems_correctLimitPassedToEndpoint() throws Exception {
// Arrange
Expand Down Expand Up @@ -129,6 +123,12 @@ private List<CartItem> getCartItems() {
return cartItems;
}

private List<CartItemSchema> getCartItemSchemes() {
List<CartItemSchema> schemas = new ArrayList<>();
schemas.add(new CartItemSchema(ID, TITLE, DESCRIPTION, PRICE));
return schemas;
}

private void success() {
// no-op
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,12 @@
import org.mockito.stubbing.Answer;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.instanceOf;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.hamcrest.CoreMatchers.nullValue;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;
Expand Down Expand Up @@ -58,12 +53,6 @@ public void setup() throws Exception {
success();
}

private List<CartItemSchema> getCartItemSchemes() {
List<CartItemSchema> schemas = new ArrayList<>();
schemas.add(new CartItemSchema(ID, TITLE, DESCRIPTION, PRICE));
return schemas;
}

@Test
public void fetchCartItems_correctLimitPassedToEndpoint() throws Exception {
// Arrange
Expand Down Expand Up @@ -139,6 +128,12 @@ private List<CartItem> getCartItems() {
return cartItems;
}

private List<CartItemSchema> getCartItemSchemes() {
List<CartItemSchema> schemas = new ArrayList<>();
schemas.add(new CartItemSchema(ID, TITLE, DESCRIPTION, PRICE));
return schemas;
}

private void success() {
doAnswer(new Answer() {
@Override
Expand Down