Created
February 22, 2017 08:58
-
-
Save madhu314/a280a36849500cb4e5d6d424a5142ded to your computer and use it in GitHub Desktop.
This file contains hidden or 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
@Test public void testMoves() throws Exception { | |
assertThat(fixture.sortedList().size()).isEqualTo(0); | |
addArticles(); | |
fixture.callbackRecorder().clear(); | |
int index1 = 2; | |
Article articleOne = fixture.sortedList().get(index1); | |
assertThat(fixture.sortedList().indexOf(articleOne)).isEqualTo(index1); | |
fixture.sortedList().updateItemAt(index1, articleOne.toBuilder().publishedTime(1).build()); | |
assertThat(fixture.callbackRecorder().insertions().size()).isEqualTo(0); | |
assertThat(fixture.callbackRecorder().deletions().size()).isEqualTo(0); | |
assertThat(fixture.callbackRecorder().moves().size()).isEqualTo(1); | |
assertThat(fixture.callbackRecorder().moves().get(0).first).isEqualTo(2); | |
assertThat(fixture.callbackRecorder().moves().get(0).second).isEqualTo(0); | |
assertThat(fixture.callbackRecorder().changes().get(0).first).isEqualTo(2); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment