Package org.ff4j.test.audit
Class EventRepositoryTestSupport
java.lang.Object
org.ff4j.test.audit.EventRepositoryTestSupport
Event Repository test support.
- Author:
- Cedrick LUNVEN (@clunven)
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.ff4j.audit.EventEvent generation.protected org.ff4j.audit.EventgenerateFeatureUsageEvent(String uid, long timestamp) Event generation.protected org.ff4j.audit.EventgenerateRandomFeatureUsageEvent(long from, long to) Generate random event.protected org.ff4j.audit.EventgenerateRandomFeatureUsageEvent(String uid, long from, long to) Generate random event.protected abstract org.ff4j.audit.repository.EventRepositoryAny store test will declare its store through this callback.protected voidpopulateRepository(long from, long to, int totalEvent) Generate random events for.voidsetUp()voidTDD.voidTDD.voidTDD.voidvoidTDD.voidTDD.voidTDD.voidTDD.voidTDD.voidTDD.voidTDD.voidvoidTDD.voidTDD.
-
Field Details
-
ff4j
protected org.ff4j.FF4j ff4jInitialize -
features
Feature List. -
repo
protected org.ff4j.audit.repository.EventRepository repoTargetEventRepository. -
publisher
protected org.ff4j.audit.EventPublisher publisherTarget publisher.
-
-
Constructor Details
-
EventRepositoryTestSupport
public EventRepositoryTestSupport()
-
-
Method Details
-
setUp
- Throws:
Exception
-
generateFeatureUsageEvent
Event generation.- Parameters:
uid- target unique identifier- Returns:
- unique event
-
generateFeatureUsageEvent
Event generation.- Parameters:
uid- target unique identifiertimestamp- current event time- Returns:
-
generateRandomFeatureUsageEvent
Generate random event.- Parameters:
uid- event uidfrom- time slot into- time slot to- Returns:
- target event
-
generateRandomFeatureUsageEvent
protected org.ff4j.audit.Event generateRandomFeatureUsageEvent(long from, long to) Generate random event.- Parameters:
uid- event uidfrom- time slot into- time slot to- Returns:
- target event
-
populateRepository
Generate random events for.- Throws:
InterruptedException
-
initRepository
protected abstract org.ff4j.audit.repository.EventRepository initRepository()Any store test will declare its store through this callback.- Returns:
- working feature store
- Throws:
Exception- error during building feature store
-
testSaveEventUnit
TDD.- Throws:
InterruptedException
-
testSaveEventNull
public void testSaveEventNull()TDD. -
testSaveAuditTrail
TDD.- Throws:
InterruptedException
-
testFeatureUsageBarCharts
TDD.- Throws:
InterruptedException
-
testFeatureUsageHitCount
TDD.- Throws:
InterruptedException
-
testSearchFeatureUsageEvents
- Throws:
InterruptedException
-
testGetFeatureUsageHistory
- Throws:
InterruptedException
-
testSourceHitCount
TDD.- Throws:
InterruptedException
-
testUserHitCount
TDD.- Throws:
InterruptedException
-
testHostHitCount
TDD.- Throws:
InterruptedException
-
testSaveCheckOff
TDD.- Throws:
InterruptedException
-
testLimitEventSeries
TDD.- Throws:
InterruptedException
-
testGetEventByUID
TDD.- Throws:
InterruptedException
-
testPurgeEvents
TDD.- Throws:
InterruptedException
-