Skip to content

Commit

Permalink
Use GetAssetId() to generate asset ID for legacy IOP/TP tests
Browse files Browse the repository at this point in the history
  • Loading branch information
griffri committed Jun 4, 2024
1 parent 5fbaa14 commit 7e52113
Showing 1 changed file with 14 additions and 17 deletions.
31 changes: 14 additions & 17 deletions src/protagonist/API.Tests/Integration/ModifyAssetTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ public async Task Put_Existing_Asset_UpdatesAsset_IfIncomingDeliveryChannelsNull
{
const int customer = 325665;
const int space = 2;
var assetId = new AssetId(customer, space, nameof(Put_Existing_Asset_UpdatesAsset_IfIncomingDeliveryChannelsNull_AndLegacyEnabled));
var assetId = AssetIdGenerator.GetAssetId(customer, space);

await dbContext.Customers.AddTestCustomer(customer);
await dbContext.Spaces.AddTestSpace(customer, space);
Expand Down Expand Up @@ -1273,7 +1273,7 @@ public async Task Put_NewImageAsset_WithImageOptimisationPolicy_Creates_Asset_Wh
{
const int customer = 325665;
const int space = 2;
var assetId = new AssetId(customer, space, nameof(Put_NewImageAsset_WithImageOptimisationPolicy_Creates_Asset_WhenLegacyEnabled));
var assetId = AssetIdGenerator.GetAssetId(customer, space);
await dbContext.Customers.AddTestCustomer(customer);
await dbContext.Spaces.AddTestSpace(customer, space);
await dbContext.DefaultDeliveryChannels.AddTestDefaultDeliveryChannels(customer);
Expand Down Expand Up @@ -1317,7 +1317,7 @@ public async Task Put_NewImageAsset_WithImageOptimisationPolicy_Returns400_IfInv
{
const int customer = 325665;
const int space = 2;
var assetId = new AssetId(customer, space, nameof(Put_NewImageAsset_WithImageOptimisationPolicy_Returns400_IfInvalid_AndLegacyEnabled));
var assetId = AssetIdGenerator.GetAssetId(customer, space);
await dbContext.Customers.AddTestCustomer(customer);
await dbContext.Spaces.AddTestSpace(customer, space);
await dbContext.DefaultDeliveryChannels.AddTestDefaultDeliveryChannels(customer);
Expand Down Expand Up @@ -1347,7 +1347,7 @@ public async Task Put_ExistingImageAsset_WithImageOptimisationPolicy_AddsDeliver
{
const int customer = 325665;
const int space = 2;
var assetId = new AssetId(customer, space, nameof(Put_ExistingImageAsset_WithImageOptimisationPolicy_AddsDeliveryChannelsToAsset_WhenLegacyEnabled));
var assetId = AssetIdGenerator.GetAssetId(customer, space);

await dbContext.Customers.AddTestCustomer(customer);
await dbContext.Spaces.AddTestSpace(customer, space);
Expand Down Expand Up @@ -1397,7 +1397,7 @@ public async Task Put_NewImageAsset_WithThumbnailPolicy_Creates_Asset_WhenLegacy
{
const int customer = 325665;
const int space = 2;
var assetId = new AssetId(customer, space, nameof(Put_NewImageAsset_WithThumbnailPolicy_Creates_Asset_WhenLegacyEnabled));
var assetId = AssetIdGenerator.GetAssetId(customer, space);

await dbContext.Customers.AddTestCustomer(customer);
await dbContext.Spaces.AddTestSpace(customer, space);
Expand Down Expand Up @@ -1443,7 +1443,7 @@ public async Task Put_NewImageAsset_WithThumbnailPolicy_Returns400_IfInvalid_And
{
const int customer = 325665;
const int space = 2;
var assetId = new AssetId(customer, space, nameof(Put_NewImageAsset_WithImageOptimisationPolicy_Returns400_IfInvalid_AndLegacyEnabled));
var assetId = AssetIdGenerator.GetAssetId(customer, space);
await dbContext.Customers.AddTestCustomer(customer);
await dbContext.Spaces.AddTestSpace(customer, space);
await dbContext.DefaultDeliveryChannels.AddTestDefaultDeliveryChannels(customer);
Expand Down Expand Up @@ -1473,7 +1473,7 @@ public async Task Put_ExistingImageAsset_WithThumbnailPolicy_AddsDeliveryChannel
{
const int customer = 325665;
const int space = 2;
var assetId = new AssetId(customer, space, nameof(Put_ExistingImageAsset_WithThumbnailPolicy_AddsDeliveryChannelsToAsset_WhenLegacyEnabled));
var assetId = AssetIdGenerator.GetAssetId(customer, space);

await dbContext.Customers.AddTestCustomer(customer);
await dbContext.Spaces.AddTestSpace(customer, space);
Expand Down Expand Up @@ -1522,7 +1522,7 @@ public async Task Put_NewVideoAsset_WithImageOptimisationPolicy_Creates_Asset_Wh
{
const int customer = 325665;
const int space = 2;
var assetId = new AssetId(customer, space, nameof(Put_NewVideoAsset_WithImageOptimisationPolicy_Creates_Asset_WhenLegacyEnabled));
var assetId = AssetIdGenerator.GetAssetId(customer, space);
await dbContext.Customers.AddTestCustomer(customer);
await dbContext.Spaces.AddTestSpace(customer, space);
await dbContext.DefaultDeliveryChannels.AddTestDefaultDeliveryChannels(customer);
Expand Down Expand Up @@ -1565,7 +1565,7 @@ public async Task Put_NewVideoAsset_WithImageOptimisationPolicy_Returns400_IfInv
{
const int customer = 325665;
const int space = 2;
var assetId = new AssetId(customer, space, nameof(Put_NewVideoAsset_WithImageOptimisationPolicy_Returns400_IfInvalid_AndLegacyEnabled));
var assetId = AssetIdGenerator.GetAssetId(customer, space);
await dbContext.Customers.AddTestCustomer(customer);
await dbContext.Spaces.AddTestSpace(customer, space);
await dbContext.DefaultDeliveryChannels.AddTestDefaultDeliveryChannels(customer);
Expand Down Expand Up @@ -1596,8 +1596,7 @@ public async Task Put_ExistingVideoAsset_WithImageOptimisationPolicy_AddsDeliver
{
const int customer = 325665;
const int space = 2;
var assetId = new AssetId(customer, space, nameof(Put_ExistingVideoAsset_WithImageOptimisationPolicy_AddsDeliveryChannelsToAsset_WhenLegacyEnabled));

var assetId = AssetIdGenerator.GetAssetId(customer, space);
await dbContext.Customers.AddTestCustomer(customer);
await dbContext.Spaces.AddTestSpace(customer, space);
await dbContext.DefaultDeliveryChannels.AddTestDefaultDeliveryChannels(customer);
Expand Down Expand Up @@ -1644,7 +1643,7 @@ public async Task Put_NewAudioAsset_WithImageOptimisationPolicy_Creates_Asset_Wh
{
const int customer = 325665;
const int space = 2;
var assetId = new AssetId(customer, space, nameof(Put_NewAudioAsset_WithImageOptimisationPolicy_Creates_Asset_WhenLegacyEnabled));
var assetId = AssetIdGenerator.GetAssetId(customer, space);
await dbContext.Customers.AddTestCustomer(customer);
await dbContext.Spaces.AddTestSpace(customer, space);
await dbContext.DefaultDeliveryChannels.AddTestDefaultDeliveryChannels(customer);
Expand Down Expand Up @@ -1687,7 +1686,7 @@ public async Task Put_NewAudioAsset_WithImageOptimisationPolicy_Returns400_IfInv
{
const int customer = 325665;
const int space = 2;
var assetId = new AssetId(customer, space, nameof(Put_NewAudioAsset_WithImageOptimisationPolicy_Returns400_IfInvalid_AndLegacyEnabled));
var assetId = AssetIdGenerator.GetAssetId(customer, space);
await dbContext.Customers.AddTestCustomer(customer);
await dbContext.Spaces.AddTestSpace(customer, space);
await dbContext.DefaultDeliveryChannels.AddTestDefaultDeliveryChannels(customer);
Expand Down Expand Up @@ -1718,8 +1717,7 @@ public async Task Put_ExistingAudioAsset_WithImageOptimisationPolicy_AddsDeliver
{
const int customer = 325665;
const int space = 2;
var assetId = new AssetId(customer, space, nameof(Put_ExistingAudioAsset_WithImageOptimisationPolicy_AddsDeliveryChannelsToAsset_WhenLegacyEnabled));

var assetId = AssetIdGenerator.GetAssetId(customer, space);
await dbContext.Customers.AddTestCustomer(customer);
await dbContext.Spaces.AddTestSpace(customer, space);
await dbContext.DefaultDeliveryChannels.AddTestDefaultDeliveryChannels(customer);
Expand Down Expand Up @@ -1764,8 +1762,7 @@ public async Task Put_NewFileAsset_Creates_Asset_WhenLegacyEnabled()
{
const int customer = 325665;
const int space = 2;
var assetId = new AssetId(customer, space, nameof(Put_NewImageAsset_WithThumbnailPolicy_Creates_Asset_WhenLegacyEnabled));

var assetId = AssetIdGenerator.GetAssetId(customer, space);
await dbContext.Customers.AddTestCustomer(customer);
await dbContext.Spaces.AddTestSpace(customer, space);
await dbContext.DefaultDeliveryChannels.AddTestDefaultDeliveryChannels(customer);
Expand Down

0 comments on commit 7e52113

Please sign in to comment.