1 /* 2 * Copyright (C) 2024 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package android.adservices.adselection; 18 19 import android.adservices.common.AdTechIdentifier; 20 import android.adservices.common.CommonFixture; 21 22 import com.google.common.collect.ImmutableSet; 23 24 public class SellerConfigurationFixture { 25 26 public static final AdTechIdentifier BUYER_1 = CommonFixture.VALID_BUYER_1; 27 public static final AdTechIdentifier BUYER_2 = CommonFixture.VALID_BUYER_2; 28 29 public static final Integer BUYER_1_TARGET_SIZE_B = 1000; 30 public static final Integer BUYER_2_TARGET_SIZE_B = 500; 31 32 public static final Integer SELLER_TARGET_SIZE_B = 2000; 33 34 public static final PerBuyerConfiguration PER_BUYER_CONFIGURATION_1 = 35 new PerBuyerConfiguration.Builder() 36 .setBuyer(BUYER_1) 37 .setTargetInputSizeBytes(BUYER_1_TARGET_SIZE_B) 38 .build(); 39 40 public static final PerBuyerConfiguration PER_BUYER_CONFIGURATION_2 = 41 new PerBuyerConfiguration.Builder() 42 .setBuyer(BUYER_2) 43 .setTargetInputSizeBytes(BUYER_2_TARGET_SIZE_B) 44 .build(); 45 46 public static final SellerConfiguration SELLER_CONFIGURATION = 47 new SellerConfiguration.Builder() 48 .setMaximumPayloadSizeBytes(SELLER_TARGET_SIZE_B) 49 .setPerBuyerConfigurations( 50 ImmutableSet.of(PER_BUYER_CONFIGURATION_1, PER_BUYER_CONFIGURATION_2)) 51 .build(); 52 } 53