()
| 60 | } |
| 61 | |
| 62 | @Test |
| 63 | public void testRemove() { |
| 64 | JsonArray array = new JsonArray(); |
| 65 | assertThrows(IndexOutOfBoundsException.class, () -> array.remove(0)); |
| 66 | |
| 67 | JsonPrimitive a = new JsonPrimitive("a"); |
| 68 | array.add(a); |
| 69 | assertThat(array.remove(a)).isTrue(); |
| 70 | assertThat(array).doesNotContain(a); |
| 71 | array.add(a); |
| 72 | array.add(new JsonPrimitive("b")); |
| 73 | assertThat(array.remove(1).getAsString()).isEqualTo("b"); |
| 74 | assertThat(array).hasSize(1); |
| 75 | assertThat(array).contains(a); |
| 76 | } |
| 77 | |
| 78 | @Test |
| 79 | public void testSet() { |
nothing calls this directly
no test coverage detected