uniqueOnConflict = OnConflict.REPLACE) @SerializedName("login") public String login; @Column @Nullable @SerializedName("avatar_url") public String avatarUrl; @Column @Nullable @SerializedName("html_url") public String htmlUrl; @Column @SerializedName("contributions") public int contributions; }
using mock object - it does not throw any "unexpected interaction" exception mockedList.add("one"); mockedList.clear(); // selective, explicit, highly readable verification verify(mockedList).add("one"); verify(mockedList).clear();
using mock object - it does not throw any "unexpected interaction" exception mockedList.add("one"); mockedList.clear(); // selective, explicit, highly readable verification verify(mockedList).add("one"); verify(mockedList).clear();
using mock object - it does not throw any "unexpected interaction" exception mockedList.add("one"); mockedList.clear(); // selective, explicit, highly readable verification verify(mockedList).add("one"); verify(mockedList).clear();
using mock object - it does not throw any "unexpected interaction" exception mockedList.add("one"); mockedList.clear(); // selective, explicit, highly readable verification verify(mockedList).add("one"); verify(mockedList).clear();
LinkedList mockedList = mock(LinkedList.class); // stubbing appears before the actual execution when(mockedList.get(0)).thenReturn("first"); // the following is "first" assertThat((String) mockedList.get(0), is("first")); // the following is "null" because get(999) was not stubbed assertThat(mockedList.get(999), nullValue());
LinkedList mockedList = mock(LinkedList.class); // stubbing appears before the actual execution when(mockedList.get(0)).thenReturn("first"); // the following is "first" assertThat((String) mockedList.get(0), is("first")); // the following is "null" because get(999) was not stubbed assertThat(mockedList.get(999), nullValue());
LinkedList mockedList = mock(LinkedList.class); // stubbing appears before the actual execution when(mockedList.get(0)).thenReturn("first"); // the following is "first" assertThat((String) mockedList.get(0), is("first")); // the following is "null" because get(999) was not stubbed assertThat(mockedList.get(999), nullValue());
LinkedList mockedList = mock(LinkedList.class); // stubbing appears before the actual execution when(mockedList.get(0)).thenReturn("first"); // the following is "first" assertThat((String) mockedList.get(0), is("first")); // the following is "null" because get(999) was not stubbed assertThat(mockedList.get(999), nullValue());
LinkedList mockedList = mock(LinkedList.class); // stubbing appears before the actual execution when(mockedList.get(0)).thenReturn("first"); // the following is "first" assertThat((String) mockedList.get(0), is("first")); // the following is "null" because get(999) was not stubbed assertThat(mockedList.get(999), nullValue());