Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SDK-3459] Unit tests for ImpressionManager #513

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ class ImpressionManager @JvmOverloads constructor(

/**
* Counts the impressions for a campaign within the last N weeks.
* It looks up in the current week if the value one is passed as week offset
*
* @param campaignId The identifier of the campaign.
* @param weeks The time interval in weeks.
Expand Down Expand Up @@ -177,7 +178,7 @@ class ImpressionManager @JvmOverloads constructor(
* @param campaignId The identifier of the campaign.
* @return The total number of impressions recorded for the campaign.
*/
fun getImpressionCount(campaignId: String): Int {
private fun getImpressionCount(campaignId: String): Int {
return storeRegistry.impressionStore?.read(campaignId)?.size ?: 0
}

Expand All @@ -188,7 +189,7 @@ class ImpressionManager @JvmOverloads constructor(
* @param timestampStart The start timestamp of the time interval (in seconds since the Unix epoch).
* @return The count of impressions within the specified time interval.
*/
fun getImpressionCount(campaignId: String, timestampStart: Long): Int {
private fun getImpressionCount(campaignId: String, timestampStart: Long): Int {
val timestamps = getImpressions(campaignId)

var count = 0
Expand Down
Loading