public void TestEmptyListFront() { var testWindow = new ArrayDeque <TimeWindowPair>(); var list1 = new ArrayDeque <EventBean>(); AddToWindow(testWindow, 10L, list1); var list2 = new ArrayDeque <EventBean>(); list2.Add(events.Get("a")); AddToWindow(testWindow, 15L, list2); var list3 = new ArrayDeque <EventBean>(); list3.Add(events.Get("c")); list3.Add(events.Get("d")); AddToWindow(testWindow, 20L, list3); var list4 = new ArrayDeque <EventBean>(); list4.Add(events.Get("e")); AddToWindow(testWindow, 40L, list4); IEnumerator <EventBean> enumerator = new TimeWindowEnumerator(testWindow); EPAssertionUtil.AssertEqualsExactOrder(new object[] { events.Get("a"), events.Get("c"), events.Get("d"), events.Get("e") }, enumerator); }
public void TestEmpty() { var testWindow = new ArrayDeque <TimeWindowPair>(); IEnumerator <EventBean> enumerator = new TimeWindowEnumerator(testWindow); EPAssertionUtil.AssertEqualsExactOrder(null, enumerator); }
public void TestObjectAndNull() { var testWindow = new ArrayDeque <TimeWindowPair>(); var list1 = new ArrayDeque <EventBean>(); list1.Add(events.Get("c")); list1.Add(events.Get("d")); AddToWindow(testWindow, 10L, list1); AddToWindow(testWindow, 20L, events.Get("a")); AddToWindow(testWindow, 30L, null); var list3 = new ArrayDeque <EventBean>(); list3.Add(events.Get("e")); AddToWindow(testWindow, 40L, list3); IEnumerator <EventBean> enumerator = new TimeWindowEnumerator(testWindow); EPAssertionUtil.AssertEqualsExactOrder(new object[] { events.Get("c"), events.Get("d"), events.Get("a"), events.Get("e") }, enumerator); }
public void TestEmptyList() { var testWindow = new ArrayDeque <TimeWindowPair>(); var list1 = new ArrayDeque <EventBean>(); AddToWindow(testWindow, 10L, list1); IEnumerator <EventBean> enumerator = new TimeWindowEnumerator(testWindow); EPAssertionUtil.AssertEqualsExactOrder((object[])null, enumerator); }
public void TestOneElement() { var testWindow = new ArrayDeque <TimeWindowPair>(); var list = new ArrayDeque <EventBean>(); list.Add(events.Get("a")); AddToWindow(testWindow, 10L, list); IEnumerator <EventBean> enumerator = new TimeWindowEnumerator(testWindow); EPAssertionUtil.AssertEqualsExactOrder(new object[] { events.Get("a") }, enumerator); }
public void TestTwoSeparateEntryElement() { var testWindow = new ArrayDeque <TimeWindowPair>(); var list2 = new ArrayDeque <EventBean>(); list2.Add(events.Get("b")); AddToWindow(testWindow, 5L, list2); // Actually before list1 var list1 = new ArrayDeque <EventBean>(); list1.Add(events.Get("a")); AddToWindow(testWindow, 10L, list1); IEnumerator <EventBean> enumerator = new TimeWindowEnumerator(testWindow); EPAssertionUtil.AssertEqualsExactOrder(new object[] { events.Get("b"), events.Get("a") }, enumerator); }