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

Tests housekeeping: reorganize test model structure #2989

Closed
Closed
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
2 changes: 1 addition & 1 deletion src/test/groovy/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ ij_groovy_extends_list_wrap = normal
ij_groovy_for_brace_force = always
ij_groovy_for_statement_wrap = normal
ij_groovy_if_brace_force = always
ij_groovy_imports_layout = *, |, java.**, |, $*
ij_groovy_imports_layout = *,|,javax.**,java.**,|,$*
ij_groovy_insert_inner_class_imports = true
ij_groovy_keep_blank_lines_before_right_brace = 2
ij_groovy_keep_blank_lines_in_code = 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ import com.fasterxml.jackson.databind.annotation.JsonNaming
import groovy.transform.EqualsAndHashCode
import groovy.transform.ToString
import org.prebid.server.functional.model.AccountStatus
import org.prebid.server.functional.model.config.auction.AccountAuctionConfig
import org.prebid.server.functional.model.config.hook.AccountHooksConfiguration
import org.prebid.server.functional.model.config.privacy.AccountPrivacyConfig

@EqualsAndHashCode
@ToString(includeNames = true, ignoreNulls = true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ import com.fasterxml.jackson.annotation.JsonProperty
class AccountMetricsConfig {

@JsonProperty("verbosity-level")
AccountMetricsVerbosityLevel verbosityLevel;
AccountMetricsVerbosityLevel verbosityLevel
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.prebid.server.functional.model.config
package org.prebid.server.functional.model.config.auction

import com.fasterxml.jackson.annotation.JsonProperty
import com.fasterxml.jackson.databind.PropertyNamingStrategies
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.prebid.server.functional.model.config
package org.prebid.server.functional.model.config.auction

import com.fasterxml.jackson.annotation.JsonProperty
import groovy.transform.ToString
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.prebid.server.functional.model.config
package org.prebid.server.functional.model.config.auction

import groovy.transform.ToString

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.prebid.server.functional.model.config
package org.prebid.server.functional.model.config.auction

import com.fasterxml.jackson.databind.PropertyNamingStrategies
import com.fasterxml.jackson.databind.annotation.JsonNaming
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.prebid.server.functional.model.config
package org.prebid.server.functional.model.config.auction

import com.fasterxml.jackson.annotation.JsonValue

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.prebid.server.functional.model.config
package org.prebid.server.functional.model.config.auction

import com.fasterxml.jackson.databind.PropertyNamingStrategies
import com.fasterxml.jackson.databind.annotation.JsonNaming
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.prebid.server.functional.model.config
package org.prebid.server.functional.model.config.hook

import com.fasterxml.jackson.databind.PropertyNamingStrategies
import com.fasterxml.jackson.databind.annotation.JsonNaming
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.prebid.server.functional.model.config
package org.prebid.server.functional.model.config.hook

import com.fasterxml.jackson.annotation.JsonValue
import groovy.transform.ToString
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.prebid.server.functional.model.config
package org.prebid.server.functional.model.config.hook

import groovy.transform.ToString
import org.prebid.server.functional.model.ModuleName

@ToString(includeNames = true, ignoreNulls = true)
class EndpointExecutionPlan {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package org.prebid.server.functional.model.config
package org.prebid.server.functional.model.config.hook

import com.fasterxml.jackson.databind.PropertyNamingStrategies
import com.fasterxml.jackson.databind.annotation.JsonNaming
import groovy.transform.ToString
import org.prebid.server.functional.model.ModuleName

@ToString(includeNames = true, ignoreNulls = true)
@JsonNaming(PropertyNamingStrategies.KebabCaseStrategy)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.prebid.server.functional.model.config
package org.prebid.server.functional.model.config.hook

import groovy.transform.ToString
import org.prebid.server.functional.model.ModuleName

@ToString(includeNames = true, ignoreNulls = true)
class ExecutionPlan {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.prebid.server.functional.model.config
package org.prebid.server.functional.model.config.hook

import com.fasterxml.jackson.databind.PropertyNamingStrategies
import com.fasterxml.jackson.databind.annotation.JsonNaming
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.prebid.server.functional.model
package org.prebid.server.functional.model.config.hook

import com.fasterxml.jackson.annotation.JsonValue

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.prebid.server.functional.model.config
package org.prebid.server.functional.model.config.hook

import com.fasterxml.jackson.databind.PropertyNamingStrategies
import com.fasterxml.jackson.databind.annotation.JsonNaming
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.prebid.server.functional.model.config
package org.prebid.server.functional.model.config.hook

import com.fasterxml.jackson.annotation.JsonValue
import groovy.transform.ToString
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.prebid.server.functional.model.config
package org.prebid.server.functional.model.config.hook

import groovy.transform.ToString
import org.prebid.server.functional.model.ModuleName

@ToString(includeNames = true, ignoreNulls = true)
class StageExecutionPlan {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.prebid.server.functional.model.config
package org.prebid.server.functional.model.config.privacy

import com.fasterxml.jackson.databind.PropertyNamingStrategies
import com.fasterxml.jackson.databind.annotation.JsonNaming
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.prebid.server.functional.model.config
package org.prebid.server.functional.model.config.privacy

import com.fasterxml.jackson.annotation.JsonProperty
import com.fasterxml.jackson.databind.PropertyNamingStrategies
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.prebid.server.functional.model.config
package org.prebid.server.functional.model.config.privacy

import com.fasterxml.jackson.databind.PropertyNamingStrategies
import com.fasterxml.jackson.databind.annotation.JsonNaming
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.prebid.server.functional.model.config
package org.prebid.server.functional.model.config.privacy

import groovy.transform.ToString
import org.prebid.server.functional.model.request.auction.PrivacyModule
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.prebid.server.functional.model.config
package org.prebid.server.functional.model.config.privacy

import com.fasterxml.jackson.annotation.JsonProperty
import com.fasterxml.jackson.databind.PropertyNamingStrategies
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package org.prebid.server.functional.model.config
package org.prebid.server.functional.model.config.privacy

import groovy.transform.ToString
import org.prebid.server.functional.model.request.auction.ActivityType

import static org.prebid.server.functional.model.config.DataActivity.INVALID
import static org.prebid.server.functional.model.config.LogicalRestrictedRule.LogicalOperation.OR
import static org.prebid.server.functional.model.config.UsNationalPrivacySection.GPC
import static DataActivity.INVALID
import static LogicalOperation.OR
import static UsNationalPrivacySection.GPC

@ToString(includeNames = true, ignoreNulls = true)
class ActivityConfig {
Expand All @@ -24,7 +24,7 @@ class ActivityConfig {
static ActivityConfig getConfigWithDefaultRestrictRules(List<ActivityType> activities = ActivityType.values()) {
new ActivityConfig().tap {
it.activities = activities
it.restrictIfTrue = LogicalRestrictedRule.generateSingleRestrictedRule(OR, [new InequalityValueRule(GPC, INVALID)])
it.restrictIfTrue = LogicalRestrictedRule.generateSingleRestrictedRule(OR, [new InequalityValueRule(GPC, INVALID)])
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.prebid.server.functional.model.config
package org.prebid.server.functional.model.config.privacy

import com.fasterxml.jackson.annotation.JsonValue

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.prebid.server.functional.model.config
package org.prebid.server.functional.model.config.privacy

import com.fasterxml.jackson.core.JacksonException
import com.fasterxml.jackson.core.JsonParser
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.prebid.server.functional.model.config
package org.prebid.server.functional.model.config.privacy

import groovy.transform.ToString
import org.prebid.server.functional.model.request.GppSectionId
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.prebid.server.functional.model.config
package org.prebid.server.functional.model.config.privacy

import com.fasterxml.jackson.core.JacksonException
import com.fasterxml.jackson.core.JsonParser
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package org.prebid.server.functional.model.config.privacy

enum LogicalOperation {

OR, AND
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.prebid.server.functional.model.config
package org.prebid.server.functional.model.config.privacy

import com.fasterxml.jackson.annotation.JsonProperty
import groovy.transform.ToString
Expand Down Expand Up @@ -49,8 +49,4 @@ class LogicalRestrictedRule {
LogicalRestrictedRule includeSubRestriction(LogicalOperation logicalOperation, ValueRestrictedRule valueOperation) {
includeSubRestriction(logicalOperation, new LogicalRestrictedRule(valueOperation))
}

enum LogicalOperation {
OR, AND
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.prebid.server.functional.model.config
package org.prebid.server.functional.model.config.privacy

import com.fasterxml.jackson.annotation.JsonValue

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.prebid.server.functional.model.config
package org.prebid.server.functional.model.config.privacy

import com.fasterxml.jackson.databind.PropertyNamingStrategies
import com.fasterxml.jackson.databind.annotation.JsonNaming
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.prebid.server.functional.model.config
package org.prebid.server.functional.model.config.privacy

import com.fasterxml.jackson.annotation.JsonValue

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.prebid.server.functional.model.config
package org.prebid.server.functional.model.config.privacy

import com.fasterxml.jackson.annotation.JsonValue
import groovy.transform.ToString
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.prebid.server.functional.model.config
package org.prebid.server.functional.model.config.privacy

import com.fasterxml.jackson.annotation.JsonValue

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.prebid.server.functional.model.config
package org.prebid.server.functional.model.config.privacy

import com.fasterxml.jackson.databind.PropertyNamingStrategies
import com.fasterxml.jackson.databind.annotation.JsonNaming
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package org.prebid.server.functional.model.config
package org.prebid.server.functional.model.config.privacy

import com.fasterxml.jackson.annotation.JsonValue
import com.iab.gpp.encoder.field.UspNatV1Field
import org.prebid.server.functional.util.PBSUtils

enum UsNationalPrivacySection {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.prebid.server.functional.model.config
package org.prebid.server.functional.model.config.privacy

import com.fasterxml.jackson.annotation.JsonIgnoreProperties
import com.fasterxml.jackson.core.JsonGenerator
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
package org.prebid.server.functional.model.db

import groovy.transform.ToString
import org.prebid.server.functional.model.AccountStatus
import org.prebid.server.functional.model.config.AccountConfig
import org.prebid.server.functional.model.db.typeconverter.AccountConfigTypeConverter
import org.prebid.server.functional.model.db.typeconverter.AccountStatusTypeConverter

import javax.persistence.Column
import javax.persistence.Convert
import javax.persistence.Entity
import javax.persistence.GeneratedValue
import javax.persistence.Id
import javax.persistence.Table
import org.prebid.server.functional.model.AccountStatus
import org.prebid.server.functional.model.config.AccountConfig
import org.prebid.server.functional.model.db.typeconverter.AccountConfigTypeConverter
import org.prebid.server.functional.model.db.typeconverter.AccountStatusTypeConverter

import java.sql.Timestamp

import static javax.persistence.GenerationType.IDENTITY
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
package org.prebid.server.functional.model.db

import groovy.transform.ToString
import org.prebid.server.functional.model.db.typeconverter.ImpConfigTypeConverter
import org.prebid.server.functional.model.request.auction.BidRequest
import org.prebid.server.functional.model.request.auction.Imp

import javax.persistence.Column
import javax.persistence.Convert
import javax.persistence.Entity
import javax.persistence.GeneratedValue
import javax.persistence.Id
import javax.persistence.Table
import org.prebid.server.functional.model.db.typeconverter.ImpConfigTypeConverter
import org.prebid.server.functional.model.request.auction.BidRequest
import org.prebid.server.functional.model.request.auction.Imp

import static javax.persistence.GenerationType.IDENTITY

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
package org.prebid.server.functional.model.db

import groovy.transform.ToString
import org.prebid.server.functional.model.db.typeconverter.StoredRequestConfigTypeConverter
import org.prebid.server.functional.model.request.amp.AmpRequest
import org.prebid.server.functional.model.request.auction.BidRequest

import javax.persistence.Column
import javax.persistence.Convert
import javax.persistence.Entity
import javax.persistence.GeneratedValue
import javax.persistence.Id
import javax.persistence.Table
import org.prebid.server.functional.model.db.typeconverter.StoredRequestConfigTypeConverter
import org.prebid.server.functional.model.request.amp.AmpRequest
import org.prebid.server.functional.model.request.auction.BidRequest

import static javax.persistence.GenerationType.IDENTITY

Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
package org.prebid.server.functional.model.db

import groovy.transform.ToString
import org.prebid.server.functional.model.db.typeconverter.StoredAuctionResponseConfigTypeConverter
import org.prebid.server.functional.model.db.typeconverter.StoredBidResponseConfigTypeConverter
import org.prebid.server.functional.model.response.auction.BidResponse
import org.prebid.server.functional.model.response.auction.SeatBid

import javax.persistence.Column
import javax.persistence.Convert
import javax.persistence.Entity
import javax.persistence.GeneratedValue
import javax.persistence.Id
import javax.persistence.Table
import org.prebid.server.functional.model.db.typeconverter.StoredAuctionResponseConfigTypeConverter
import org.prebid.server.functional.model.db.typeconverter.StoredBidResponseConfigTypeConverter
import org.prebid.server.functional.model.response.auction.BidResponse
import org.prebid.server.functional.model.response.auction.SeatBid

import static javax.persistence.GenerationType.IDENTITY

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package org.prebid.server.functional.model.db.typeconverter

import javax.persistence.AttributeConverter
import org.prebid.server.functional.model.config.AccountConfig
import org.prebid.server.functional.util.ObjectMapperWrapper

import javax.persistence.AttributeConverter

class AccountConfigTypeConverter implements AttributeConverter<AccountConfig, String>, ObjectMapperWrapper {

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package org.prebid.server.functional.model.db.typeconverter

import javax.persistence.AttributeConverter
import org.prebid.server.functional.model.AccountStatus

import javax.persistence.AttributeConverter

class AccountStatusTypeConverter implements AttributeConverter<AccountStatus, String> {

@Override
Expand Down
Loading
Loading