Ignore warnings about using obsolete members in Umbraco.Tests.UnitTests.csproj and Umbraco.Core.csproj
LocalFileSystemTemporaryFileRepository: Don't pass null to a method that doesn't accept nullable argument - https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2264 Fix remaining warning marked as error
This commit is contained in:
@@ -999,10 +999,12 @@ public static class PublishedContentExtensions
|
||||
/// </summary>
|
||||
/// <param name="parentNodes"></param>
|
||||
/// <param name="variationContextAccessor">Variation context accessor.</param>
|
||||
/// <param name="navigationQueryService"></param>
|
||||
/// <param name="culture">
|
||||
/// The specific culture to filter for. If null is used the current culture is used. (Default is
|
||||
/// null)
|
||||
/// </param>
|
||||
/// <param name="publishedCache"></param>
|
||||
/// <returns></returns>
|
||||
/// <remarks>
|
||||
/// This can be useful in order to return all nodes in an entire site by a type when combined with TypedContentAtRoot
|
||||
@@ -1357,6 +1359,7 @@ public static class PublishedContentExtensions
|
||||
/// Gets the children of the content, of any of the specified types.
|
||||
/// </summary>
|
||||
/// <param name="content">The content.</param>
|
||||
/// <param name="publishedCache"></param>
|
||||
/// <param name="navigationQueryService"></param>
|
||||
/// <param name="variationContextAccessor">The accessor for the VariationContext</param>
|
||||
/// <param name="culture">
|
||||
@@ -1364,7 +1367,6 @@ public static class PublishedContentExtensions
|
||||
/// null)
|
||||
/// </param>
|
||||
/// <param name="contentTypeAlias">The content type alias.</param>
|
||||
/// <param name="publishedContentCache"></param>
|
||||
/// <returns>The children of the content, of any of the specified types.</returns>
|
||||
public static IEnumerable<IPublishedContent> ChildrenOfType(
|
||||
this IPublishedContent content,
|
||||
@@ -1382,10 +1384,12 @@ public static class PublishedContentExtensions
|
||||
/// <typeparam name="T">The content type.</typeparam>
|
||||
/// <param name="content">The content.</param>
|
||||
/// <param name="variationContextAccessor">The accessor for the VariationContext</param>
|
||||
/// <param name="navigationQueryService"></param>
|
||||
/// <param name="culture">
|
||||
/// The specific culture to filter for. If null is used the current culture is used. (Default is
|
||||
/// null)
|
||||
/// </param>
|
||||
/// <param name="publishedCache"></param>
|
||||
/// <returns>The children of content, of the given content type.</returns>
|
||||
/// <remarks>
|
||||
/// <para>Children are sorted by their sortOrder.</para>
|
||||
@@ -1488,12 +1492,13 @@ public static class PublishedContentExtensions
|
||||
/// Gets the siblings of the content, of a given content type.
|
||||
/// </summary>
|
||||
/// <param name="content">The content.</param>
|
||||
/// <param name="publishedSnapshot">Published snapshot instance</param>
|
||||
/// <param name="variationContextAccessor">Variation context accessor.</param>
|
||||
/// <param name="culture">
|
||||
/// The specific culture to filter for. If null is used the current culture is used. (Default is
|
||||
/// null)
|
||||
/// </param>
|
||||
/// <param name="publishedCache"></param>
|
||||
/// <param name="navigationQueryService"></param>
|
||||
/// <param name="contentTypeAlias">The content type alias.</param>
|
||||
/// <returns>The siblings of the content, of the given content type.</returns>
|
||||
/// <remarks>
|
||||
@@ -1514,8 +1519,9 @@ public static class PublishedContentExtensions
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The content type.</typeparam>
|
||||
/// <param name="content">The content.</param>
|
||||
/// <param name="publishedSnapshot">Published snapshot instance</param>
|
||||
/// <param name="variationContextAccessor">Variation context accessor.</param>
|
||||
/// <param name="publishedCache"></param>
|
||||
/// <param name="navigationQueryService"></param>
|
||||
/// <param name="culture">
|
||||
/// The specific culture to filter for. If null is used the current culture is used. (Default is
|
||||
/// null)
|
||||
@@ -1577,13 +1583,14 @@ public static class PublishedContentExtensions
|
||||
/// Gets the siblings of the content including the node itself to indicate the position, of a given content type.
|
||||
/// </summary>
|
||||
/// <param name="content">The content.</param>
|
||||
/// <param name="publishedSnapshot">Published snapshot instance</param>
|
||||
/// <param name="variationContextAccessor">Variation context accessor.</param>
|
||||
/// <param name="culture">
|
||||
/// The specific culture to filter for. If null is used the current culture is used. (Default is
|
||||
/// null)
|
||||
/// </param>
|
||||
/// <param name="navigationQueryService"></param>
|
||||
/// <param name="contentTypeAlias">The content type alias.</param>
|
||||
/// <param name="publishedCache"></param>
|
||||
/// <returns>The siblings of the content including the node itself, of the given content type.</returns>
|
||||
public static IEnumerable<IPublishedContent> SiblingsAndSelfOfType(
|
||||
this IPublishedContent content,
|
||||
@@ -1593,7 +1600,6 @@ public static class PublishedContentExtensions
|
||||
string contentTypeAlias,
|
||||
string? culture = null)
|
||||
{
|
||||
|
||||
var parentSuccess = navigationQueryService.TryGetParentKey(content.Key, out Guid? parentKey);
|
||||
|
||||
IPublishedContent? parent = parentKey is null ? null : publishedCache.GetById(parentKey.Value);
|
||||
@@ -1620,12 +1626,13 @@ public static class PublishedContentExtensions
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The content type.</typeparam>
|
||||
/// <param name="content">The content.</param>
|
||||
/// <param name="publishedSnapshot">Published snapshot instance</param>
|
||||
/// <param name="variationContextAccessor">Variation context accessor.</param>
|
||||
/// <param name="navigationQueryService"></param>
|
||||
/// <param name="culture">
|
||||
/// The specific culture to filter for. If null is used the current culture is used. (Default is
|
||||
/// null)
|
||||
/// </param>
|
||||
/// <param name="publishedCache"></param>
|
||||
/// <returns>The siblings of the content including the node itself, of the given content type.</returns>
|
||||
public static IEnumerable<T> SiblingsAndSelf<T>(
|
||||
this IPublishedContent content,
|
||||
@@ -1728,6 +1735,7 @@ public static class PublishedContentExtensions
|
||||
/// </summary>
|
||||
/// <param name="content">The content.</param>
|
||||
/// <param name="variationContextAccessor">Variation context accessor.</param>
|
||||
/// <param name="navigationQueryService"></param>
|
||||
/// <param name="contentTypeService">The content type service.</param>
|
||||
/// <param name="mediaTypeService">The media type service.</param>
|
||||
/// <param name="memberTypeService">The member type service.</param>
|
||||
@@ -1737,6 +1745,7 @@ public static class PublishedContentExtensions
|
||||
/// The specific culture to filter for. If null is used the current culture is used. (Default is
|
||||
/// null)
|
||||
/// </param>
|
||||
/// <param name="publishedCache"></param>
|
||||
/// <returns>The children of the content.</returns>
|
||||
public static DataTable ChildrenAsTable(
|
||||
this IPublishedContent content,
|
||||
@@ -1756,6 +1765,7 @@ public static class PublishedContentExtensions
|
||||
/// </summary>
|
||||
/// <param name="content">The content.</param>
|
||||
/// <param name="variationContextAccessor">Variation context accessor.</param>
|
||||
/// <param name="navigationQueryService"></param>
|
||||
/// <param name="contentTypeService">The content type service.</param>
|
||||
/// <param name="mediaTypeService">The media type service.</param>
|
||||
/// <param name="memberTypeService">The member type service.</param>
|
||||
@@ -1765,6 +1775,7 @@ public static class PublishedContentExtensions
|
||||
/// The specific culture to filter for. If null is used the current culture is used. (Default is
|
||||
/// null)
|
||||
/// </param>
|
||||
/// <param name="publishedCache"></param>
|
||||
/// <returns>The children of the content.</returns>
|
||||
private static DataTable GenerateDataTable(
|
||||
IPublishedContent content,
|
||||
|
||||
@@ -30,8 +30,6 @@ public interface IPublishedMemberCache
|
||||
/// <summary>
|
||||
/// Get an <see cref="IPublishedContent" /> from an <see cref="IMember" />
|
||||
/// </summary>
|
||||
/// <param name="key">The key of the member to fetch</param>
|
||||
/// <param name="preview">Will fetch draft if this is set to true</param>
|
||||
/// <returns></returns>
|
||||
Task<IPublishedMember?> GetAsync(IMember member);
|
||||
}
|
||||
|
||||
@@ -6,10 +6,10 @@ namespace Umbraco.Cms.Core.Services;
|
||||
|
||||
public interface IDocumentUrlService
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Initializes the service and ensure the content in the database is correct with the current configuration.
|
||||
/// </summary>
|
||||
/// <param name="forceEmpty"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
Task InitAsync(bool forceEmpty, CancellationToken cancellationToken);
|
||||
|
||||
@@ -13,12 +13,12 @@
|
||||
[SA1111] adjust parenthesis, [SA1649] file name match type name, [CA2017] match parameters number,
|
||||
[CS0108] hidden inherited member, [CS0649] default value always null, [CS1574] unresolveable cref,
|
||||
[CS1998] remove async or make method synchronous, [CS8073] result always true/false, [IDE0060]
|
||||
remove unused parameter, [IDE1006] naming prefix, [SA1306] fieold name, [CS1723] XML TEntity,
|
||||
[CS0419] ambiguous cref, and remove overrides -->
|
||||
remove unused parameter, [IDE1006] naming prefix, [SA1306] field name, [CS1723] XML TEntity,
|
||||
[CS0419] ambiguous cref, [CS0612] obsolete, and remove overrides -->
|
||||
<WarningsNotAsErrors>
|
||||
SA1117,SA1401,SA1134,SA1649,CS0618,CS0067,SA1405,SA1600,CS0168,CS0169,CS0183,SYSLIB0045,SYSLIB0051,
|
||||
SYSLIB0044,SYSLIB0023,SYSLIB0003,SA1111,SA1649,CA2017,CS0108,CS0649,CS0672,CS1574,CS1998,CS8073,IDE0060,
|
||||
IDE1006,SA1306,CS1723,CS0419
|
||||
SYSLIB0044,SYSLIB0023,SYSLIB0003,SA1111,SA1649,CA2017,CS0108,CS0612,CS0649,CS0672,CS1574,CS1998,CS8073,
|
||||
IDE0060,IDE1006,SA1306,CS1723,CS0419
|
||||
</WarningsNotAsErrors>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -59,11 +59,4 @@ public interface IUmbracoContext : IDisposable
|
||||
/// Gets a value indicating whether the current user is in a preview mode and browsing the site (ie. not in the admin UI)
|
||||
/// </summary>
|
||||
bool InPreviewMode { get; }
|
||||
|
||||
// TODO: Do we need this?
|
||||
/// <summary>
|
||||
/// Forces the context into preview
|
||||
/// </summary>
|
||||
/// <returns>A <see cref="IDisposable" /> instance to be disposed to exit the preview context</returns>
|
||||
// IDisposable ForcedPreview(bool preview);
|
||||
}
|
||||
|
||||
@@ -51,8 +51,7 @@ public static class ExamineExtensions
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates an <see cref="IEnumerable{PublishedSearchResult}" /> containing all content, media or members from the
|
||||
/// <paramref name="snapshot" />.
|
||||
/// Creates an <see cref="IEnumerable{PublishedSearchResult}" /> containing all content, media or members from the snapshot.
|
||||
/// </summary>
|
||||
/// <param name="results">The search results.</param>
|
||||
/// <param name="cacheManager">The caches.</param>
|
||||
|
||||
@@ -67,6 +67,7 @@ namespace Umbraco.Extensions
|
||||
/// <param name="sql">The Sql statement.</param>
|
||||
/// <param name="field">An expression specifying the field.</param>
|
||||
/// <param name="values">The values.</param>
|
||||
/// <param name="alias"></param>
|
||||
/// <returns>The Sql statement.</returns>
|
||||
public static Sql<ISqlContext> WhereIn<TDto>(this Sql<ISqlContext> sql, Expression<Func<TDto, object?>> field, IEnumerable? values, string alias)
|
||||
{
|
||||
|
||||
@@ -71,8 +71,6 @@ internal sealed class LocalFileSystemTemporaryFileRepository : ITemporaryFileRep
|
||||
|
||||
public async Task SaveAsync(TemporaryFileModel model)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(nameof(model));
|
||||
|
||||
// Ensure folder does not exist
|
||||
await DeleteAsync(model.Key);
|
||||
|
||||
|
||||
@@ -125,6 +125,7 @@ public class BackOfficeIdentityUser : UmbracoIdentityUser
|
||||
/// <param name="culture"></param>
|
||||
/// <param name="name"></param>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="kind"></param>
|
||||
public static BackOfficeIdentityUser CreateNew(GlobalSettings globalSettings, string? username, string email, string culture, string? name = null, Guid? id = null, UserKind kind = UserKind.Default)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(username))
|
||||
|
||||
@@ -232,8 +232,7 @@ public static class BuilderExtensions
|
||||
return builder;
|
||||
}
|
||||
|
||||
public static T WithPropertyValues<T>(this T builder, object propertyValues, string? culture = null,
|
||||
string? segment = null)
|
||||
public static T WithPropertyValues<T>(this T builder, object propertyValues, string? culture = null, string? segment = null)
|
||||
where T : IWithPropertyValues
|
||||
{
|
||||
builder.PropertyValues = propertyValues;
|
||||
|
||||
@@ -41,8 +41,7 @@ public class MediaTypeEditingBuilder : ContentTypeEditingBaseBuilder<MediaTypeEd
|
||||
.Build();
|
||||
}
|
||||
|
||||
public static MediaTypeCreateModel CreateBasicFolderMediaType(string alias = "basicFolder",
|
||||
string name = "BasicFolder")
|
||||
public static MediaTypeCreateModel CreateBasicFolderMediaType(string alias = "basicFolder", string name = "BasicFolder")
|
||||
{
|
||||
var builder = new MediaTypeEditingBuilder();
|
||||
return (MediaTypeCreateModel)builder
|
||||
|
||||
@@ -835,46 +835,45 @@ public partial class BlockListElementLevelVariationTests
|
||||
Guid.NewGuid(),
|
||||
Guid.NewGuid(),
|
||||
new BlockProperty(
|
||||
new List<BlockPropertyValue> {
|
||||
new List<BlockPropertyValue>
|
||||
{
|
||||
new() { Alias = "invariantText", Value = "#1: The first invariant content value" },
|
||||
new() { Alias = "variantText", Value = "#1: The first content value in English", Culture = "en-US" },
|
||||
new() { Alias = "variantText", Value = "#1: The first content value in Danish", Culture = "da-DK" }
|
||||
},
|
||||
[],
|
||||
null,
|
||||
null
|
||||
)
|
||||
null)
|
||||
),
|
||||
(
|
||||
Guid.NewGuid(),
|
||||
Guid.NewGuid(),
|
||||
new BlockProperty(
|
||||
new List<BlockPropertyValue> {
|
||||
new List<BlockPropertyValue>
|
||||
{
|
||||
new() { Alias = "invariantText", Value = "#2: The first invariant content value" },
|
||||
new() { Alias = "variantText", Value = "#2: The first content value in English", Culture = "en-US" },
|
||||
new() { Alias = "variantText", Value = "#2: The first content value in Danish", Culture = "da-DK" }
|
||||
},
|
||||
[],
|
||||
null,
|
||||
null
|
||||
)
|
||||
null)
|
||||
),
|
||||
(
|
||||
Guid.NewGuid(),
|
||||
Guid.NewGuid(),
|
||||
new BlockProperty(
|
||||
new List<BlockPropertyValue> {
|
||||
new List<BlockPropertyValue>
|
||||
{
|
||||
new() { Alias = "invariantText", Value = "#3: The first invariant content value" },
|
||||
new() { Alias = "variantText", Value = "#3: The first content value in English", Culture = "en-US" },
|
||||
new() { Alias = "variantText", Value = "#3: The first content value in Danish", Culture = "da-DK" }
|
||||
},
|
||||
[],
|
||||
null,
|
||||
null
|
||||
)
|
||||
null)
|
||||
),
|
||||
]
|
||||
);
|
||||
]);
|
||||
|
||||
content.Properties["blocks"]!.SetValue(JsonSerializer.Serialize(blockListValue));
|
||||
ContentService.Save(content);
|
||||
@@ -984,18 +983,17 @@ public partial class BlockListElementLevelVariationTests
|
||||
firstBlockContentElementKey,
|
||||
firstBlockSettingsElementKey,
|
||||
new BlockProperty(
|
||||
new List<BlockPropertyValue> {
|
||||
new List<BlockPropertyValue>
|
||||
{
|
||||
new() { Alias = "invariantText", Value = "#1: The first invariant content value" },
|
||||
new() { Alias = "variantText", Value = "#1: The first content value in English", Culture = "en-US" },
|
||||
new() { Alias = "variantText", Value = "#1: The first content value in Danish", Culture = "da-DK" }
|
||||
},
|
||||
[],
|
||||
null,
|
||||
null
|
||||
)
|
||||
null)
|
||||
)
|
||||
]
|
||||
);
|
||||
]);
|
||||
|
||||
content.Properties["blocks"]!.SetValue(JsonSerializer.Serialize(blockListValue));
|
||||
ContentService.Save(content);
|
||||
@@ -1021,31 +1019,30 @@ public partial class BlockListElementLevelVariationTests
|
||||
firstBlockContentElementKey,
|
||||
firstBlockSettingsElementKey,
|
||||
new BlockProperty(
|
||||
new List<BlockPropertyValue> {
|
||||
new List<BlockPropertyValue>
|
||||
{
|
||||
new() { Alias = "invariantText", Value = "#1: The second invariant content value" },
|
||||
new() { Alias = "variantText", Value = "#1: The second content value in English", Culture = "en-US" },
|
||||
new() { Alias = "variantText", Value = "#1: The second content value in Danish", Culture = "da-DK" }
|
||||
},
|
||||
[],
|
||||
null,
|
||||
null
|
||||
)
|
||||
null)
|
||||
),
|
||||
(
|
||||
Guid.NewGuid(),
|
||||
Guid.NewGuid(),
|
||||
new BlockProperty(
|
||||
new List<BlockPropertyValue> {
|
||||
new List<BlockPropertyValue>
|
||||
{
|
||||
new() { Alias = "invariantText", Value = "#2: The second invariant content value" },
|
||||
new() { Alias = "variantText", Value = "#2: The second content value in English", Culture = "en-US" }
|
||||
},
|
||||
[],
|
||||
null,
|
||||
null
|
||||
)
|
||||
null)
|
||||
)
|
||||
]
|
||||
);
|
||||
]);
|
||||
|
||||
content.Properties["blocks"]!.SetValue(JsonSerializer.Serialize(blockListValue));
|
||||
|
||||
@@ -1103,32 +1100,31 @@ public partial class BlockListElementLevelVariationTests
|
||||
Guid.NewGuid(),
|
||||
Guid.NewGuid(),
|
||||
new BlockProperty(
|
||||
new List<BlockPropertyValue> {
|
||||
new List<BlockPropertyValue>
|
||||
{
|
||||
new() { Alias = "invariantText", Value = "#1: The invariant content value" },
|
||||
new() { Alias = "variantText", Value = "#1: The content value in English", Culture = "en-US" },
|
||||
new() { Alias = "variantText", Value = "#1: The content value in Danish", Culture = "da-DK" }
|
||||
},
|
||||
[],
|
||||
null,
|
||||
null
|
||||
)
|
||||
null)
|
||||
),
|
||||
(
|
||||
Guid.NewGuid(),
|
||||
Guid.NewGuid(),
|
||||
new BlockProperty(
|
||||
new List<BlockPropertyValue> {
|
||||
new List<BlockPropertyValue>
|
||||
{
|
||||
new() { Alias = "invariantText", Value = "#2: The invariant content value" },
|
||||
new() { Alias = "variantText", Value = "#2: The content value in English", Culture = "en-US" },
|
||||
new() { Alias = "variantText", Value = "#2: The content value in Danish", Culture = "da-DK" }
|
||||
},
|
||||
[],
|
||||
null,
|
||||
null
|
||||
)
|
||||
null)
|
||||
)
|
||||
]
|
||||
);
|
||||
]);
|
||||
|
||||
blockListValue.Expose =
|
||||
[
|
||||
@@ -1205,30 +1201,29 @@ public partial class BlockListElementLevelVariationTests
|
||||
Guid.NewGuid(),
|
||||
Guid.NewGuid(),
|
||||
new BlockProperty(
|
||||
new List<BlockPropertyValue> {
|
||||
new List<BlockPropertyValue>
|
||||
{
|
||||
new() { Alias = "invariantText", Value = "#1: The invariant content value" },
|
||||
new() { Alias = "variantText", Value = "#1: The other invariant content value" }
|
||||
},
|
||||
[],
|
||||
null,
|
||||
null
|
||||
)
|
||||
null)
|
||||
),
|
||||
(
|
||||
Guid.NewGuid(),
|
||||
Guid.NewGuid(),
|
||||
new BlockProperty(
|
||||
new List<BlockPropertyValue> {
|
||||
new List<BlockPropertyValue>
|
||||
{
|
||||
new() { Alias = "invariantText", Value = "#2: The invariant content value" },
|
||||
new() { Alias = "variantText", Value = "#2: The other invariant content value" }
|
||||
},
|
||||
[],
|
||||
null,
|
||||
null
|
||||
)
|
||||
null)
|
||||
)
|
||||
]
|
||||
);
|
||||
]);
|
||||
|
||||
blockListValue.Expose =
|
||||
[
|
||||
@@ -1307,17 +1302,16 @@ public partial class BlockListElementLevelVariationTests
|
||||
Guid.NewGuid(),
|
||||
Guid.NewGuid(),
|
||||
new BlockProperty(
|
||||
new List<BlockPropertyValue> {
|
||||
new List<BlockPropertyValue>
|
||||
{
|
||||
new() { Alias = "invariantText", Value = "#1: The invariant content value" },
|
||||
new() { Alias = "variantText", Value = "#1: The other invariant content value" }
|
||||
},
|
||||
[],
|
||||
null,
|
||||
null
|
||||
)
|
||||
null)
|
||||
)
|
||||
]
|
||||
);
|
||||
]);
|
||||
|
||||
var variantElementKey = Guid.NewGuid();
|
||||
blockListValue.Layout[Constants.PropertyEditors.Aliases.BlockList] = blockListValue
|
||||
@@ -1331,8 +1325,7 @@ public partial class BlockListElementLevelVariationTests
|
||||
new() { Alias = "variantText", Value = "#2: The variant content value in English", Culture = "en-US" },
|
||||
new() { Alias = "variantText", Value = "#2: The variant content value in Danish", Culture = "da-DK" },
|
||||
]
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
blockListValue.Expose =
|
||||
[
|
||||
@@ -1408,7 +1401,8 @@ public partial class BlockListElementLevelVariationTests
|
||||
Guid.NewGuid(),
|
||||
Guid.NewGuid(),
|
||||
new BlockProperty(
|
||||
new List<BlockPropertyValue> {
|
||||
new List<BlockPropertyValue>
|
||||
{
|
||||
new() { Alias = "invariantText", Value = "The first invariant content value" },
|
||||
new() { Alias = "variantText", Value = "The first content value in English", Culture = "en-US" },
|
||||
new() { Alias = "variantText", Value = "The first content value in Danish", Culture = "da-DK" }
|
||||
@@ -1420,11 +1414,9 @@ public partial class BlockListElementLevelVariationTests
|
||||
new() { Alias = "variantText", Value = "The first settings value in Danish", Culture = "da-DK" },
|
||||
},
|
||||
null,
|
||||
null
|
||||
)
|
||||
null)
|
||||
)
|
||||
]
|
||||
);
|
||||
]);
|
||||
|
||||
blockListValue.Expose =
|
||||
[
|
||||
@@ -1497,7 +1489,8 @@ public partial class BlockListElementLevelVariationTests
|
||||
Guid.NewGuid(),
|
||||
Guid.NewGuid(),
|
||||
new BlockProperty(
|
||||
new List<BlockPropertyValue> {
|
||||
new List<BlockPropertyValue>
|
||||
{
|
||||
new() { Alias = "invariantText", Value = "The first invariant content value" },
|
||||
new() { Alias = "variantText", Value = "The first content value in English", Culture = "en-US" },
|
||||
new() { Alias = "variantText", Value = "The first content value in Danish", Culture = "da-DK" }
|
||||
@@ -1509,11 +1502,9 @@ public partial class BlockListElementLevelVariationTests
|
||||
new() { Alias = "variantText", Value = "The first settings value in Danish", Culture = "da-DK" },
|
||||
},
|
||||
null,
|
||||
null
|
||||
)
|
||||
null)
|
||||
)
|
||||
]
|
||||
);
|
||||
]);
|
||||
|
||||
blockListValue.Expose =
|
||||
[
|
||||
|
||||
@@ -83,7 +83,7 @@ public class DocumentHybridCacheVariantsTests : UmbracoIntegrationTest
|
||||
|
||||
// Assert
|
||||
using var contextReference = UmbracoContextFactory.EnsureUmbracoContext();
|
||||
Assert.AreEqual(updatedInvariantTitle, textPage.Value(_invariantTitleAlias, "", ""));
|
||||
Assert.AreEqual(updatedInvariantTitle, textPage.Value(_invariantTitleAlias, string.Empty, string.Empty));
|
||||
Assert.AreEqual(updatedVariantTitle, textPage.Value(_variantTitleAlias, _englishIsoCode));
|
||||
Assert.AreEqual(updatedVariantTitle, textPage.Value(_variantTitleAlias, _danishIsoCode));
|
||||
}
|
||||
@@ -123,7 +123,7 @@ public class DocumentHybridCacheVariantsTests : UmbracoIntegrationTest
|
||||
|
||||
// Assert
|
||||
using var contextReference = UmbracoContextFactory.EnsureUmbracoContext();
|
||||
Assert.AreEqual(updatedInvariantTitle, textPage.Value(_invariantTitleAlias, "", ""));
|
||||
Assert.AreEqual(updatedInvariantTitle, textPage.Value(_invariantTitleAlias, string.Empty, string.Empty));
|
||||
Assert.AreEqual(updatedVariantTitle, textPage.Value(_variantTitleAlias, _englishIsoCode));
|
||||
Assert.AreEqual(_variantTitleName, textPage.Value(_variantTitleAlias, _danishIsoCode));
|
||||
}
|
||||
|
||||
@@ -258,7 +258,8 @@ public class RichTextPropertyEditorHelperTests
|
||||
Guid[] itemGuids = [Guid.Parse("36cc710a-d8a6-45d0-a07f-7bbd8742cf02"), Guid.Parse("36cc710a-d8a6-45d0-a07f-7bbd8742cf03")];
|
||||
|
||||
Assert.AreEqual(2, value.Blocks.ContentData.Count);
|
||||
for (var i = 0; i < value.Blocks.ContentData.Count; i++) {
|
||||
for (var i = 0; i < value.Blocks.ContentData.Count; i++)
|
||||
{
|
||||
var item = value.Blocks.ContentData[i];
|
||||
Assert.AreEqual(contentTypeGuids[i], item.ContentTypeKey);
|
||||
Assert.AreEqual(itemGuids[i], item.Key);
|
||||
|
||||
@@ -164,14 +164,8 @@ public class ContentNavigationServiceBaseTests
|
||||
}
|
||||
|
||||
[Test]
|
||||
[TestCase("E48DD82A-7059-418E-9B82-CDD5205796CF",
|
||||
new[]
|
||||
{
|
||||
"C6173927-0C59-4778-825D-D7B9F45D8DDE", "60E0E5C4-084E-4144-A560-7393BEAD2E96",
|
||||
"B606E3FF-E070-4D46-8CB9-D31352029FDF"
|
||||
})] // Root
|
||||
[TestCase("C6173927-0C59-4778-825D-D7B9F45D8DDE",
|
||||
new[] { "E856AC03-C23E-4F63-9AA9-681B42A58573", "A1B1B217-B02F-4307-862C-A5E22DB729EB" })] // Child 1
|
||||
[TestCase("E48DD82A-7059-418E-9B82-CDD5205796CF", new[] { "C6173927-0C59-4778-825D-D7B9F45D8DDE", "60E0E5C4-084E-4144-A560-7393BEAD2E96", "B606E3FF-E070-4D46-8CB9-D31352029FDF" })] // Root
|
||||
[TestCase("C6173927-0C59-4778-825D-D7B9F45D8DDE", new[] { "E856AC03-C23E-4F63-9AA9-681B42A58573", "A1B1B217-B02F-4307-862C-A5E22DB729EB" })] // Child 1
|
||||
[TestCase("E856AC03-C23E-4F63-9AA9-681B42A58573", new string[0])] // Grandchild 1
|
||||
[TestCase("60E0E5C4-084E-4144-A560-7393BEAD2E96", new[] { "D63C1621-C74A-4106-8587-817DEE5FB732" })] // Child 2
|
||||
[TestCase("D63C1621-C74A-4106-8587-817DEE5FB732", new[] { "56E29EA9-E224-4210-A59F-7C2C5C0C5CC7" })] // Grandchild 3
|
||||
@@ -211,8 +205,7 @@ public class ContentNavigationServiceBaseTests
|
||||
}
|
||||
|
||||
[Test]
|
||||
[TestCase("E48DD82A-7059-418E-9B82-CDD5205796CF",
|
||||
8)] // Root - Child 1, Grandchild 1, Grandchild 2, Child 2, Grandchild 3, Great-grandchild 1, Child 3, Grandchild 4
|
||||
[TestCase("E48DD82A-7059-418E-9B82-CDD5205796CF", 8)] // Root - Child 1, Grandchild 1, Grandchild 2, Child 2, Grandchild 3, Great-grandchild 1, Child 3, Grandchild 4
|
||||
[TestCase("C6173927-0C59-4778-825D-D7B9F45D8DDE", 2)] // Child 1 - Grandchild 1, Grandchild 2
|
||||
[TestCase("E856AC03-C23E-4F63-9AA9-681B42A58573", 0)] // Grandchild 1
|
||||
[TestCase("A1B1B217-B02F-4307-862C-A5E22DB729EB", 0)] // Grandchild 2
|
||||
@@ -235,19 +228,10 @@ public class ContentNavigationServiceBaseTests
|
||||
}
|
||||
|
||||
[Test]
|
||||
[TestCase("E48DD82A-7059-418E-9B82-CDD5205796CF",
|
||||
new[]
|
||||
{
|
||||
"C6173927-0C59-4778-825D-D7B9F45D8DDE", "E856AC03-C23E-4F63-9AA9-681B42A58573",
|
||||
"A1B1B217-B02F-4307-862C-A5E22DB729EB", "60E0E5C4-084E-4144-A560-7393BEAD2E96",
|
||||
"D63C1621-C74A-4106-8587-817DEE5FB732", "56E29EA9-E224-4210-A59F-7C2C5C0C5CC7",
|
||||
"B606E3FF-E070-4D46-8CB9-D31352029FDF", "F381906C-223C-4466-80F7-B63B4EE073F8"
|
||||
})] // Root
|
||||
[TestCase("C6173927-0C59-4778-825D-D7B9F45D8DDE",
|
||||
new[] { "E856AC03-C23E-4F63-9AA9-681B42A58573", "A1B1B217-B02F-4307-862C-A5E22DB729EB" })] // Child 1
|
||||
[TestCase("E48DD82A-7059-418E-9B82-CDD5205796CF", new[] { "C6173927-0C59-4778-825D-D7B9F45D8DDE", "E856AC03-C23E-4F63-9AA9-681B42A58573", "A1B1B217-B02F-4307-862C-A5E22DB729EB", "60E0E5C4-084E-4144-A560-7393BEAD2E96", "D63C1621-C74A-4106-8587-817DEE5FB732", "56E29EA9-E224-4210-A59F-7C2C5C0C5CC7", "B606E3FF-E070-4D46-8CB9-D31352029FDF", "F381906C-223C-4466-80F7-B63B4EE073F8" })] // Root
|
||||
[TestCase("C6173927-0C59-4778-825D-D7B9F45D8DDE", new[] { "E856AC03-C23E-4F63-9AA9-681B42A58573", "A1B1B217-B02F-4307-862C-A5E22DB729EB" })] // Child 1
|
||||
[TestCase("E856AC03-C23E-4F63-9AA9-681B42A58573", new string[0])] // Grandchild 1
|
||||
[TestCase("60E0E5C4-084E-4144-A560-7393BEAD2E96",
|
||||
new[] { "D63C1621-C74A-4106-8587-817DEE5FB732", "56E29EA9-E224-4210-A59F-7C2C5C0C5CC7" })] // Child 2
|
||||
[TestCase("60E0E5C4-084E-4144-A560-7393BEAD2E96", new[] { "D63C1621-C74A-4106-8587-817DEE5FB732", "56E29EA9-E224-4210-A59F-7C2C5C0C5CC7" })] // Child 2
|
||||
[TestCase("D63C1621-C74A-4106-8587-817DEE5FB732", new[] { "56E29EA9-E224-4210-A59F-7C2C5C0C5CC7" })] // Grandchild 3
|
||||
[TestCase("56E29EA9-E224-4210-A59F-7C2C5C0C5CC7", new string[0])] // Great-grandchild 1
|
||||
[TestCase("B606E3FF-E070-4D46-8CB9-D31352029FDF", new[] { "F381906C-223C-4466-80F7-B63B4EE073F8" })] // Child 3
|
||||
@@ -310,14 +294,8 @@ public class ContentNavigationServiceBaseTests
|
||||
[Test]
|
||||
[TestCase("E48DD82A-7059-418E-9B82-CDD5205796CF", new string[0])] // Root
|
||||
[TestCase("C6173927-0C59-4778-825D-D7B9F45D8DDE", new[] { "E48DD82A-7059-418E-9B82-CDD5205796CF" })] // Child 1
|
||||
[TestCase("E856AC03-C23E-4F63-9AA9-681B42A58573",
|
||||
new[] { "C6173927-0C59-4778-825D-D7B9F45D8DDE", "E48DD82A-7059-418E-9B82-CDD5205796CF" })] // Grandchild 1
|
||||
[TestCase("56E29EA9-E224-4210-A59F-7C2C5C0C5CC7",
|
||||
new[]
|
||||
{
|
||||
"D63C1621-C74A-4106-8587-817DEE5FB732", "60E0E5C4-084E-4144-A560-7393BEAD2E96",
|
||||
"E48DD82A-7059-418E-9B82-CDD5205796CF"
|
||||
})] // Great-grandchild 1
|
||||
[TestCase("E856AC03-C23E-4F63-9AA9-681B42A58573", new[] { "C6173927-0C59-4778-825D-D7B9F45D8DDE", "E48DD82A-7059-418E-9B82-CDD5205796CF" })] // Grandchild 1
|
||||
[TestCase("56E29EA9-E224-4210-A59F-7C2C5C0C5CC7", new[] { "D63C1621-C74A-4106-8587-817DEE5FB732", "60E0E5C4-084E-4144-A560-7393BEAD2E96", "E48DD82A-7059-418E-9B82-CDD5205796CF" })] // Great-grandchild 1
|
||||
public void Can_Get_Ancestors_From_Existing_Content_Key_In_Correct_Order(Guid childKey, string[] ancestors)
|
||||
{
|
||||
// Arrange
|
||||
|
||||
@@ -12,10 +12,10 @@
|
||||
remove param, [SA1405] Debug.Assert message text, [ASP0019] header append, [CS0114] inherited
|
||||
member, [CS0661]/[CS0659], adjust overrides, [CS0414] unassigned field, [CS0252] confirm
|
||||
reference comparison, [IDE0060] remove parameter, [IDE1006] fix naming rule violation,
|
||||
and remove overrides -->
|
||||
[CS0612] obsolete, and remove overrides -->
|
||||
<WarningsNotAsErrors>
|
||||
SYSLIB0013,CS0618,CS1998,SA1117,CS0067,CA1822,CA1416,IDE0028,SA1401,SA1405
|
||||
IDE0060,SA1405,ASP0019,CS0114,CS0661,CS0659,CS0414,CS0252,IDE0060,IDE1006
|
||||
IDE0060,SA1405,ASP0019,CS0114,CS0661,CS0659,CS0414,CS0252,CS0612,IDE0060,IDE1006
|
||||
</WarningsNotAsErrors>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
|
||||
Reference in New Issue
Block a user