From ed3d5a5c37a4d4e4a4f688d383d1bca35239d23f Mon Sep 17 00:00:00 2001 From: Ralf Date: Sun, 26 Oct 2025 05:35:03 +0100 Subject: [PATCH] Fix fetch condition olderthan-x-y --- src/XrmMockup365/Mappings.cs | 12 +++++----- .../TestFetchConditionOperators.cs | 24 +++++++++---------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/XrmMockup365/Mappings.cs b/src/XrmMockup365/Mappings.cs index 1c7d94b9..5f7d0d8e 100644 --- a/src/XrmMockup365/Mappings.cs +++ b/src/XrmMockup365/Mappings.cs @@ -135,12 +135,12 @@ public static Type EventOperationToRequest(EventOperation operation) { "not-null", ConditionOperator.NotNull }, //{ "ne", ConditionOperator.NotOn }, { "null", ConditionOperator.Null }, - { "older-than-x-days", ConditionOperator.OlderThanXDays }, - { "older-than-x-hours", ConditionOperator.OlderThanXHours }, - { "older-than-x-minutes", ConditionOperator.OlderThanXMinutes }, - { "older-than-x-months", ConditionOperator.OlderThanXMonths }, - { "older-than-x-weeks", ConditionOperator.OlderThanXWeeks }, - { "older-than-x-years", ConditionOperator.OlderThanXYears }, + { "olderthan-x-days", ConditionOperator.OlderThanXDays }, + { "olderthan-x-hours", ConditionOperator.OlderThanXHours }, + { "olderthan-x-minutes", ConditionOperator.OlderThanXMinutes }, + { "olderthan-x-months", ConditionOperator.OlderThanXMonths }, + { "olderthan-x-weeks", ConditionOperator.OlderThanXWeeks }, + { "olderthan-x-years", ConditionOperator.OlderThanXYears }, { "on", ConditionOperator.On }, { "on-or-after", ConditionOperator.OnOrAfter }, { "on-or-before", ConditionOperator.OnOrBefore }, diff --git a/tests/XrmMockup365Test/TestFetchConditionOperators.cs b/tests/XrmMockup365Test/TestFetchConditionOperators.cs index c97e984a..34d1c077 100644 --- a/tests/XrmMockup365Test/TestFetchConditionOperators.cs +++ b/tests/XrmMockup365Test/TestFetchConditionOperators.cs @@ -13,18 +13,18 @@ public TestFetchConditionOperators(XrmMockupFixture fixture) : base(fixture) } [Theory] - [InlineData("older-than-x-years", 365 * 1440, 1, true)] - [InlineData("older-than-x-years", 365 * 1440, 3, false)] - [InlineData("older-than-x-months", 30 * 1440, 1, true)] - [InlineData("older-than-x-months", 30 * 1440, 3, false)] - [InlineData("older-than-x-weeks", 7 * 1440, 1, true)] - [InlineData("older-than-x-weeks", 7 * 1440, 3, false)] - [InlineData("older-than-x-days", 1440, 1, true)] - [InlineData("older-than-x-days", 1440, 3, false)] - [InlineData("older-than-x-hours", 60, 1, true)] - [InlineData("older-than-x-hours", 60, 3, false)] - [InlineData("older-than-x-minutes", 1, 1, true)] - [InlineData("older-than-x-minutes", 1, 3, false)] + [InlineData("olderthan-x-years", 365 * 1440, 1, true)] + [InlineData("olderthan-x-years", 365 * 1440, 3, false)] + [InlineData("olderthan-x-months", 30 * 1440, 1, true)] + [InlineData("olderthan-x-months", 30 * 1440, 3, false)] + [InlineData("olderthan-x-weeks", 7 * 1440, 1, true)] + [InlineData("olderthan-x-weeks", 7 * 1440, 3, false)] + [InlineData("olderthan-x-days", 1440, 1, true)] + [InlineData("olderthan-x-days", 1440, 3, false)] + [InlineData("olderthan-x-hours", 60, 1, true)] + [InlineData("olderthan-x-hours", 60, 3, false)] + [InlineData("olderthan-x-minutes", 1, 1, true)] + [InlineData("olderthan-x-minutes", 1, 3, false)] public void TestFetchConditionOperatorsTheoryOlderThanX(string conditionOperator, int minutes, int x, bool hasHit) { orgAdminUIService.Create(