assertEquals(13, this.countRowsInTable("STATS_FOLDER"));
assertEquals(3, this.countRowsInTable("STATS_RENDER_TIME"));
}
public void testStoreTwoPeople() throws Exception {
PersonImpl person = new PersonImpl();
person.setID(1);
person.setAttribute(IPerson.USERNAME, "admin");
this.jpaPortalEventStore.addPersonGroups(person, new HashSet<String>(Arrays.asList("admin", "student")));
UserLoggedInPortalEvent loggedInPortalEvent = new UserLoggedInPortalEvent(this, person);
this.jpaPortalEventStore.storePortalEvents(loggedInPortalEvent);
this.checkPoint();
assertEquals(1, this.countRowsInTable("STATS_SESSION"));
assertEquals(2, this.countRowsInTable("STATS_SESSION_GROUPS"));
assertEquals(1, this.countRowsInTable("STATS_EVENT"));
assertEquals(1, this.countRowsInTable("STATS_EVENT_TYPE"));
UserLoggedOutPortalEvent loggedOutPortalEvent = new UserLoggedOutPortalEvent(this, person);
this.jpaPortalEventStore.storePortalEvents(loggedOutPortalEvent);
this.checkPoint();
assertEquals(1, this.countRowsInTable("STATS_SESSION"));
assertEquals(2, this.countRowsInTable("STATS_SESSION_GROUPS"));
assertEquals(2, this.countRowsInTable("STATS_EVENT"));
assertEquals(2, this.countRowsInTable("STATS_EVENT_TYPE"));
person = new PersonImpl();
person.setID(2);
person.setAttribute(IPerson.USERNAME, "student");
this.jpaPortalEventStore.addPersonGroups(person, new HashSet<String>(Arrays.asList("developer", "student")));
loggedInPortalEvent = new UserLoggedInPortalEvent(this, person);
this.jpaPortalEventStore.storePortalEvents(loggedInPortalEvent);
this.checkPoint();