Merge branch 'release/17.0' into v17/dev
# Conflicts: # src/Umbraco.Web.UI.Client/src/packages/core/recycle-bin/entity-action/restore-from-recycle-bin/restore-from-recycle-bin.action.ts # tests/Umbraco.Tests.AcceptanceTest/package-lock.json # tests/Umbraco.Tests.AcceptanceTest/package.json
This commit is contained in:
@@ -1,11 +1,7 @@
|
||||
// Copyright (c) Umbraco.
|
||||
// See LICENSE for more details.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using Microsoft.Extensions.Primitives;
|
||||
using NUnit.Framework;
|
||||
using Umbraco.Cms.Core.PropertyEditors;
|
||||
@@ -31,6 +27,17 @@ public class ObjectExtensionsTests
|
||||
|
||||
private CultureInfo _savedCulture;
|
||||
|
||||
[Test]
|
||||
public void Can_Create_Enumerable_Of_One()
|
||||
{
|
||||
var input = "hello";
|
||||
#pragma warning disable CS0618 // Type or member is obsolete
|
||||
var result = input.AsEnumerableOfOne<string>();
|
||||
#pragma warning restore CS0618 // Type or member is obsolete
|
||||
Assert.AreEqual(1, result.Count());
|
||||
Assert.AreEqual("hello", result.First());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Can_Convert_List_To_Enumerable()
|
||||
{
|
||||
|
||||
@@ -86,7 +86,7 @@ public class DateTimeUnspecifiedValueConverterTests
|
||||
private static object[] _dateTimeUnspecifiedConvertToObjectCases =
|
||||
[
|
||||
new object[] { null, null },
|
||||
new object[] { _convertToObjectInputDate, DateTime.Parse("2025-08-20T17:30:00") },
|
||||
new object[] { _convertToObjectInputDate, DateTime.Parse("2025-08-20T16:30:00") },
|
||||
];
|
||||
|
||||
[TestCaseSource(nameof(_dateTimeUnspecifiedConvertToObjectCases))]
|
||||
|
||||
@@ -86,7 +86,7 @@ public class TimeOnlyValueConverterTests
|
||||
private static object[] _timeOnlyConvertToObjectCases =
|
||||
[
|
||||
new object[] { null, null },
|
||||
new object[] { _convertToObjectInputDate, TimeOnly.Parse("17:30") },
|
||||
new object[] { _convertToObjectInputDate, TimeOnly.Parse("16:30") },
|
||||
];
|
||||
|
||||
[TestCaseSource(nameof(_timeOnlyConvertToObjectCases))]
|
||||
|
||||
Reference in New Issue
Block a user