Merge branch 'master' into 3.0.0

pull/1821/head
Nikita 6 years ago
commit 8b0a684550

@ -81,7 +81,7 @@
<dependency> <dependency>
<groupId>org.assertj</groupId> <groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId> <artifactId>assertj-core</artifactId>
<version>3.11.0</version> <version>3.11.1</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>

@ -725,14 +725,14 @@ public class RedissonListTest extends BaseTest {
list.add(10); list.add(10);
List<Integer> subList = list.subList(3, 7); List<Integer> subList = list.subList(3, 7);
assertThat(subList).containsExactly(4, 5, 6, 7); assertThat(subList.iterator()).containsExactly(4, 5, 6, 7);
subList.clear(); subList.clear();
assertThat(list).containsExactly(1, 2, 3, 8, 9, 10); assertThat(list).containsExactly(1, 2, 3, 8, 9, 10);
assertThat(subList.size()).isZero(); assertThat(subList.size()).isZero();
List<Integer> subList2 = list.subList(3, 6); List<Integer> subList2 = list.subList(3, 6);
assertThat(subList2).containsExactly(8, 9, 10); assertThat(subList2.iterator()).containsExactly(8, 9, 10);
} }
@Test @Test
@ -802,7 +802,7 @@ public class RedissonListTest extends BaseTest {
list.add(10); list.add(10);
List<Integer> subList = list.subList(3, 7); List<Integer> subList = list.subList(3, 7);
assertThat(subList).containsExactly(4, 5, 6, 7); assertThat(subList.iterator()).containsExactly(4, 5, 6, 7);
for (Iterator<Integer> iterator = subList.iterator(); iterator.hasNext();) { for (Iterator<Integer> iterator = subList.iterator(); iterator.hasNext();) {
Integer num = iterator.next(); Integer num = iterator.next();
@ -811,7 +811,7 @@ public class RedissonListTest extends BaseTest {
} }
} }
assertThat(subList).containsExactly(4, 6, 7); assertThat(subList.iterator()).containsExactly(4, 6, 7);
ListIterator<Integer> iterator = subList.listIterator(); ListIterator<Integer> iterator = subList.listIterator();
assertThat(iterator.hasPrevious()).isFalse(); assertThat(iterator.hasPrevious()).isFalse();
@ -865,16 +865,16 @@ public class RedissonListTest extends BaseTest {
list.add(8); list.add(8);
List<Integer> subList = list.subList(2, 6); List<Integer> subList = list.subList(2, 6);
assertThat(subList).containsExactly(3, 4, 5, 6); assertThat(subList.iterator()).containsExactly(3, 4, 5, 6);
assertThat(subList.size()).isEqualTo(4); assertThat(subList.size()).isEqualTo(4);
Integer val = subList.remove(2); Integer val = subList.remove(2);
assertThat(val).isEqualTo(5); assertThat(val).isEqualTo(5);
assertThat(subList).containsExactly(3, 4, 6); assertThat(subList.iterator()).containsExactly(3, 4, 6);
Integer val1 = subList.remove(2); Integer val1 = subList.remove(2);
assertThat(val1).isEqualTo(6); assertThat(val1).isEqualTo(6);
assertThat(subList).containsExactly(3, 4); assertThat(subList.iterator()).containsExactly(3, 4);
} }

Loading…
Cancel
Save