From 1ee63cd836ead47535dd3557cac5cd3a49045c1a Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Mon, 6 Jan 2025 05:17:21 +0100 Subject: [PATCH] chore: Remove unintentional duplicate test --- .../Given_CalendarFormatter.cs | 29 +------------------ 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/src/Uno.UI.Tests/Windows_Globalization/Given_CalendarFormatter.cs b/src/Uno.UI.Tests/Windows_Globalization/Given_CalendarFormatter.cs index 75a770a0f6ae..6c6f71269848 100644 --- a/src/Uno.UI.Tests/Windows_Globalization/Given_CalendarFormatter.cs +++ b/src/Uno.UI.Tests/Windows_Globalization/Given_CalendarFormatter.cs @@ -1,4 +1,4 @@ -using System.Globalization; +using System.Globalization; using System.Linq; using Windows.Globalization.DateTimeFormatting; using FluentAssertions; @@ -26,33 +26,6 @@ public void When_UsingVariousLanguages(string format, string language, string ex firstPattern.Should().Be(expectedPattern); } - [TestMethod] - public void When_FormattingDateVariants_ShouldProduceExpectedFormats() - { - var expectedResults = new Dictionary - { - { "{day.integer}/{month.integer}/{year.full}", "27/6/2024" }, - { "{month.full} {year.full}", "June 2024" }, - { "{month.full} {day.integer}", "June 27" }, - { "{dayofweek.abbreviated}, {day.integer} {month.abbreviated} {year.full}", "Thu, 27 Jun 2024" }, - { "{year.full}-{month.integer}-{day.integer}", "2024-6-27" }, - { "{day.integer}/{month.integer}/{year.abbreviated}", "27/6/24" }, - { "{day.integer} {month.abbreviated} {year.full}", "27 Jun 2024" }, - { "{month.full} {day.integer}, {year.full}", "June 27, 2024" }, - { "{month.abbreviated} {day.integer}, {year.full}", "Jun 27, 2024" }, - { "{dayofweek.full}, {day.integer} {month.full} {year.full}", "Thursday, 27 June 2024" }, - { "{dayofweek.abbreviated}, {day.integer} {month.abbreviated} {year.abbreviated}", "Thu, 27 Jun 24" } - }; - foreach (var kvp in expectedResults) - { - var template = kvp.Key; - var expected = kvp.Value; - var formatter = new DateTimeFormatter(template); - var formattedDate = formatter.Format(new(2024, 6, 27, 14, 30, 0, TimeSpan.Zero)); - Assert.AreEqual(expected, formattedDate, $"Mismatch for template: {template}"); - } - } - #if !NET7_0_OR_GREATER // https://github.com/unoplatform/uno/issues/9080 [TestMethod] [DataRow("day", "en-US|fr-CA|ru-RU", "{day.integer}|{day.integer}|{day.integer}")]