public void Add100StringOneByOne() { Key key = new Key(NS, SET, "100-stack-test-key-string"); var ls = new Aerospike.Helper.Collections.LargeStack(client, null, key, "100-string", null); WriteIntSubElements(ls, 100); Assert.AreEqual(100, ls.Size()); ls.Destroy(); }
public void ScanInt() { Key key = new Key(NS, SET, "100-stack-test-key-int"); var ls = new Aerospike.Helper.Collections.LargeStack(client, null, key, "100-int", null); WriteIntSubElements(ls, 100); IList values = ls.Scan(); Assert.AreEqual(100, ls.Size()); for (int x = 0; x < 100; x++) { Assert.AreEqual(values[x], x); } ls.Destroy(); }
public void peekString() { Key key = new Key(TestQueryEngine.NAMESPACE, SET, "100-stack-test-key-String"); var ls = new Aerospike.Helper.Collections.LargeStack(client, null, key, "100-String", null); WriteStringSubElements(ls, 100); Assert.AreEqual(100, ls.Size()); IList values = ls.Peek(10); for (int x = 10; x > 0; x--) { Assert.AreEqual(values[x - 1], "cats-dogs-" + (100 - x)); } ls.Destroy(); }