Exemplo n.º 1
0
        public void TestEmpty()
        {
            SuperIterator <string> it = new SuperIterator <string>(Make(null), Make(null));

            Assert.IsFalse(it.HasNext);
            try {
                it.Next();
                Fail();
            } catch (NoSuchElementException ex) {
            }
        }
Exemplo n.º 2
0
        public void TestFlow()
        {
            SuperIterator <string> it = new SuperIterator <string>(Make("a"), Make(null));

            EPAssertionUtil.AssertEqualsExactOrder(new object[] { "a" }, it);

            it = new SuperIterator <string>(Make("a,b"), Make(null));
            EPAssertionUtil.AssertEqualsExactOrder(new object[] { "a", "b" }, it);

            it = new SuperIterator <string>(Make("a"), Make("b"));
            EPAssertionUtil.AssertEqualsExactOrder(new object[] { "a", "b" }, it);

            it = new SuperIterator <string>(Make(null), Make("a,b"));
            EPAssertionUtil.AssertEqualsExactOrder(new object[] { "a", "b" }, it);
        }