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
FieldsModifier and TypeFieldDescriptionFeature List.protected FF4jInitializeprotected EventPublisherTarget publisher.protected EventRepositoryTargetEventRepository. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected EventEvent generation.protected EventgenerateFeatureUsageEvent(String uid, long timestamp) Event generation.protected EventgenerateRandomFeatureUsageEvent(long from, long to) Generate random event.protected EventgenerateRandomFeatureUsageEvent(String uid, long from, long to) Generate random event.protected abstract 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
Initialize -
features
Feature List. -
repo
TargetEventRepository. -
publisher
Target 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
Generate random event.- Parameters:
from- time slot into- time slot touid- event uid- Returns:
- target event
-
populateRepository
Generate random events for.- Throws:
InterruptedException
-
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
-