Skip to content

Commit b74c5ea

Browse files
committed
Renames DateMath tests for timezone parsing
Updates test method names to clearly indicate that they specifically test timezone parsing functionality. This improves clarity and maintainability of the test suite.
1 parent 66bee81 commit b74c5ea

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

tests/Exceptionless.DateTimeExtensions.Tests/DateMathTests.cs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ public void Parse_ComplexExpression_MultipleOperationsWithRounding()
513513
}
514514

515515
[Fact]
516-
public void Parse_WithTimeZoneInfo_Now_ReturnsCurrentTimeInSpecifiedTimezone()
516+
public void ParseTimeZone_Now_ReturnsCurrentTimeInSpecifiedTimezone()
517517
{
518518
var utcTimeZone = TimeZoneInfo.Utc;
519519
const string expression = "now";
@@ -536,7 +536,7 @@ public void Parse_WithTimeZoneInfo_Now_ReturnsCurrentTimeInSpecifiedTimezone()
536536
[InlineData("UTC", 0)]
537537
[InlineData("US/Eastern", -5)] // EST offset (not considering DST for this test)
538538
[InlineData("US/Pacific", -8)] // PST offset (not considering DST for this test)
539-
public void Parse_WithTimeZoneInfo_Now_ReturnsCorrectTimezone(string timeZoneId, int expectedOffsetHours)
539+
public void ParseTimeZone_Now_ReturnsCorrectTimezone(string timeZoneId, int expectedOffsetHours)
540540
{
541541
var timeZone = TimeZoneInfo.FindSystemTimeZoneById(timeZoneId);
542542
const string expression = "now";
@@ -553,7 +553,7 @@ public void Parse_WithTimeZoneInfo_Now_ReturnsCorrectTimezone(string timeZoneId,
553553
}
554554

555555
[Fact]
556-
public void Parse_WithTimeZoneInfo_ExplicitDateWithoutTimezone_UsesSpecifiedTimezone()
556+
public void ParseTimeZone_ExplicitDateWithoutTimezone_UsesSpecifiedTimezone()
557557
{
558558
var easternTimeZone = TimeZoneInfo.FindSystemTimeZoneById("US/Eastern");
559559
const string expression = "2023-06-15T14:30:00||";
@@ -578,7 +578,7 @@ public void Parse_WithTimeZoneInfo_ExplicitDateWithoutTimezone_UsesSpecifiedTime
578578
}
579579

580580
[Fact]
581-
public void Parse_WithTimeZoneInfo_ExplicitDateWithTimezone_PreservesOriginalTimezone()
581+
public void ParseTimeZone_ExplicitDateWithTimezone_PreservesOriginalTimezone()
582582
{
583583
var pacificTimeZone = TimeZoneInfo.FindSystemTimeZoneById("US/Pacific");
584584
const string expression = "2023-06-15T14:30:00+05:00||"; // Explicit +05:00 timezone
@@ -606,7 +606,7 @@ public void Parse_WithTimeZoneInfo_ExplicitDateWithTimezone_PreservesOriginalTim
606606
[InlineData("now+6h", 6)]
607607
[InlineData("now-2h", -2)]
608608
[InlineData("now+24h", 24)]
609-
public void Parse_WithTimeZoneInfo_HourOperations_ReturnsCorrectResult(string expression, int hours)
609+
public void ParseTimeZone_HourOperations_ReturnsCorrectResult(string expression, int hours)
610610
{
611611
var utcTimeZone = TimeZoneInfo.Utc;
612612

@@ -632,7 +632,7 @@ public void Parse_WithTimeZoneInfo_HourOperations_ReturnsCorrectResult(string ex
632632
[InlineData("now/h", true)]
633633
[InlineData("now/M", false)]
634634
[InlineData("now/M", true)]
635-
public void Parse_WithTimeZoneInfo_RoundingOperations_ReturnsCorrectResult(string expression, bool isUpperLimit)
635+
public void ParseTimeZone_RoundingOperations_ReturnsCorrectResult(string expression, bool isUpperLimit)
636636
{
637637
var centralTimeZone = TimeZoneInfo.FindSystemTimeZoneById("US/Central");
638638

@@ -679,7 +679,7 @@ public void Parse_WithTimeZoneInfo_RoundingOperations_ReturnsCorrectResult(strin
679679
}
680680

681681
[Fact]
682-
public void TryParse_WithTimeZoneInfo_ValidExpression_ReturnsTrue()
682+
public void TryParseTimeZone_ValidExpression_ReturnsTrue()
683683
{
684684
var mountainTimeZone = TimeZoneInfo.FindSystemTimeZoneById("US/Mountain");
685685
const string expression = "now+2d";
@@ -700,7 +700,7 @@ public void TryParse_WithTimeZoneInfo_ValidExpression_ReturnsTrue()
700700
}
701701

702702
[Fact]
703-
public void TryParse_WithTimeZoneInfo_InvalidExpression_ReturnsFalse()
703+
public void TryParseTimeZone_InvalidExpression_ReturnsFalse()
704704
{
705705
var utcTimeZone = TimeZoneInfo.Utc;
706706
const string expression = "invalid_expression";
@@ -717,7 +717,7 @@ public void TryParse_WithTimeZoneInfo_InvalidExpression_ReturnsFalse()
717717
}
718718

719719
[Fact]
720-
public void Parse_WithTimeZoneInfo_ComplexExpression_WorksCorrectly()
720+
public void ParseTimeZone_ComplexExpression_WorksCorrectly()
721721
{
722722
var utcTimeZone = TimeZoneInfo.Utc;
723723
const string expression = "now+1M-2d+3h/h";
@@ -739,7 +739,7 @@ public void Parse_WithTimeZoneInfo_ComplexExpression_WorksCorrectly()
739739
}
740740

741741
[Fact]
742-
public void Parse_WithTimeZoneInfo_NullTimeZone_ThrowsArgumentNullException()
742+
public void ParseTimeZone_NullTimeZone_ThrowsArgumentNullException()
743743
{
744744
const string expression = "now";
745745

@@ -749,7 +749,7 @@ public void Parse_WithTimeZoneInfo_NullTimeZone_ThrowsArgumentNullException()
749749
}
750750

751751
[Fact]
752-
public void TryParse_WithTimeZoneInfo_NullTimeZone_ThrowsArgumentNullException()
752+
public void TryParseTimeZone_NullTimeZone_ThrowsArgumentNullException()
753753
{
754754
const string expression = "now";
755755

0 commit comments

Comments
 (0)