use of org.eclipse.collections.api.LazyLongIterable in project mapdb by jankotek.
the class AbstractLazyLongIterableTestCase method testToString.
@Test
public void testToString() {
LazyLongIterable iterable = this.newWith(1L, 2L);
Assert.assertTrue("[1, 2]".equals(iterable.toString()) || "[2, 1]".equals(iterable.toString()));
LazyLongIterable iterable1 = this.newWith(0L, 31L);
Assert.assertTrue(iterable1.toString(), iterable1.toString().equals("[0, 31]") || iterable1.toString().equals("[31, 0]"));
LazyLongIterable iterable2 = this.newWith(31L, 32L);
Assert.assertTrue(iterable2.toString(), iterable2.toString().equals("[31, 32]") || iterable2.toString().equals("[32, 31]"));
LazyLongIterable iterable3 = this.newWith(32L, 33L);
Assert.assertTrue(iterable3.toString(), iterable3.toString().equals("[32, 33]") || iterable3.toString().equals("[33, 32]"));
LazyLongIterable iterable4 = this.newWith(0L, 1L);
Assert.assertTrue(iterable4.toString(), iterable4.toString().equals("[0, 1]") || iterable4.toString().equals("[1, 0]"));
}
use of org.eclipse.collections.api.LazyLongIterable in project mapdb by jankotek.
the class AbstractLazyLongIterableTestCase method appendString.
@Test
public void appendString() {
StringBuilder appendable2 = new StringBuilder();
LazyLongIterable iterable = this.newWith(1L, 2L);
iterable.appendString(appendable2);
Assert.assertTrue("1, 2".equals(appendable2.toString()) || "2, 1".equals(appendable2.toString()));
StringBuilder appendable3 = new StringBuilder();
iterable.appendString(appendable3, "/");
Assert.assertTrue("1/2".equals(appendable3.toString()) || "2/1".equals(appendable3.toString()));
StringBuilder appendable4 = new StringBuilder();
iterable.appendString(appendable4, "[", ", ", "]");
Assert.assertEquals(iterable.toString(), appendable4.toString());
StringBuilder appendable7 = new StringBuilder();
LazyLongIterable iterable1 = this.newWith(0L, 31L);
iterable1.appendString(appendable7);
Assert.assertTrue(appendable7.toString(), "0, 31".equals(appendable7.toString()) || "31, 0".equals(appendable7.toString()));
StringBuilder appendable8 = new StringBuilder();
LazyLongIterable iterable2 = this.newWith(31L, 32L);
iterable2.appendString(appendable8, "/");
Assert.assertTrue(appendable8.toString(), "31/32".equals(appendable8.toString()) || "32/31".equals(appendable8.toString()));
StringBuilder appendable9 = new StringBuilder();
LazyLongIterable iterable4 = this.newWith(32L, 33L);
iterable4.appendString(appendable9, "[", "/", "]");
Assert.assertTrue(appendable9.toString(), "[32/33]".equals(appendable9.toString()) || "[33/32]".equals(appendable9.toString()));
StringBuilder appendable10 = new StringBuilder();
LazyLongIterable iterable5 = this.newWith(0L, 1L);
iterable5.appendString(appendable10);
Assert.assertTrue(appendable10.toString(), "0, 1".equals(appendable10.toString()) || "1, 0".equals(appendable10.toString()));
StringBuilder appendable11 = new StringBuilder();
iterable5.appendString(appendable11, "/");
Assert.assertTrue(appendable11.toString(), "0/1".equals(appendable11.toString()) || "1/0".equals(appendable11.toString()));
StringBuilder appendable12 = new StringBuilder();
iterable5.appendString(appendable12, "[", "/", "]");
Assert.assertTrue(appendable12.toString(), "[0/1]".equals(appendable12.toString()) || "[1/0]".equals(appendable12.toString()));
}
use of org.eclipse.collections.api.LazyLongIterable in project mapdb by jankotek.
the class AbstractLazyLongIterableTestCase method makeString.
@Test
public void makeString() {
LazyLongIterable iterable1 = this.newWith(0L, 31L);
Assert.assertTrue(iterable1.makeString(), iterable1.makeString().equals("0, 31") || iterable1.makeString().equals("31, 0"));
LazyLongIterable iterable2 = this.newWith(31L, 32L);
Assert.assertTrue(iterable2.makeString("[", "/", "]"), iterable2.makeString("[", "/", "]").equals("[31/32]") || iterable2.makeString("[", "/", "]").equals("[32/31]"));
LazyLongIterable iterable3 = this.newWith(32L, 33L);
Assert.assertTrue(iterable3.makeString("/"), iterable3.makeString("/").equals("32/33") || iterable3.makeString("/").equals("33/32"));
LazyLongIterable iterable4 = this.newWith(1L, 2L);
Assert.assertTrue("1, 2".equals(iterable4.makeString()) || "2, 1".equals(iterable4.makeString()));
Assert.assertTrue("1/2".equals(iterable4.makeString("/")) || "2/1".equals(iterable4.makeString("/")));
Assert.assertTrue("[1/2]".equals(iterable4.makeString("[", "/", "]")) || "[2/1]".equals(iterable4.makeString("[", "/", "]")));
LazyLongIterable iterable5 = this.newWith(0L, 1L);
Assert.assertTrue(iterable5.makeString(), iterable5.makeString().equals("0, 1") || iterable5.makeString().equals("1, 0"));
Assert.assertTrue(iterable5.makeString("[", "/", "]"), iterable5.makeString("[", "/", "]").equals("[0/1]") || iterable5.makeString("[", "/", "]").equals("[1/0]"));
Assert.assertTrue(iterable5.makeString("/"), iterable5.makeString("/").equals("0/1") || iterable5.makeString("/").equals("1/0"));
}
use of org.eclipse.collections.api.LazyLongIterable in project mapdb by jankotek.
the class AbstractLazyLongIterableTestCase method toList.
@Test
public void toList() {
LazyLongIterable iterable = this.newWith(31L, 32L);
Assert.assertTrue(LongArrayList.newListWith(31L, 32L).equals(iterable.toList()) || LongArrayList.newListWith(32L, 31L).equals(iterable.toList()));
}
use of org.eclipse.collections.api.LazyLongIterable in project mapdb by jankotek.
the class AbstractLongLongMapTestCase method asLazy.
@Test
public void asLazy() {
LazyLongIterable lazy = this.map.asLazy();
Assert.assertTrue(lazy.toList().containsAll(0L, 31L, 32L));
}
Aggregations