Headless CMS and Content Managment Hub
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

43 lines
1.2 KiB

// ==========================================================================
// Squidex Headless CMS
// ==========================================================================
// Copyright (c) Squidex UG (haftungsbeschraenkt)
// All rights reserved. Licensed under the MIT license.
// ==========================================================================
using System.Reflection;
using Xunit.Sdk;
namespace Squidex.Domain.Apps.Core.Operations.HandleRules;
public sealed class ExpressionsAttribute(string? interpolationOld, string? interpolationNew, string? script, string? liquid) : DataAttribute
{
public override IEnumerable<object[]> GetData(MethodInfo testMethod)
{
if (interpolationOld != null)
{
yield return new object[] { interpolationOld };
}
if (interpolationNew != null)
{
yield return new object[] { interpolationNew };
}
if (script != null)
{
yield return new object[]
{
$"Script(`{script}`)",
};
}
if (liquid != null)
{
yield return new object[]
{
$"Liquid({liquid})",
};
}
}
}