|
|
|
@ -41,6 +41,20 @@ public class InMemoryTraceRepositoryTests {
|
|
|
|
|
List<Trace> traces = this.repository.findAll();
|
|
|
|
|
assertEquals(2, traces.size());
|
|
|
|
|
assertEquals("bar", traces.get(0).getInfo().get("bar"));
|
|
|
|
|
assertEquals("foo", traces.get(1).getInfo().get("bar"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
public void reverseFalse() {
|
|
|
|
|
this.repository.setReverse(false);
|
|
|
|
|
this.repository.setCapacity(2);
|
|
|
|
|
this.repository.add(Collections.<String, Object> singletonMap("foo", "bar"));
|
|
|
|
|
this.repository.add(Collections.<String, Object> singletonMap("bar", "foo"));
|
|
|
|
|
this.repository.add(Collections.<String, Object> singletonMap("bar", "bar"));
|
|
|
|
|
List<Trace> traces = this.repository.findAll();
|
|
|
|
|
assertEquals(2, traces.size());
|
|
|
|
|
assertEquals("bar", traces.get(1).getInfo().get("bar"));
|
|
|
|
|
assertEquals("foo", traces.get(0).getInfo().get("bar"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|