Skip to content

Commit b18d54a

Browse files
committed
fix(test): comparision ignore white spaces
1 parent 8ae7ac3 commit b18d54a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Client.Test/ItTasksApiTest.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.Collections.Generic;
3+
using System.Globalization;
34
using System.Linq;
45
using System.Threading;
56
using System.Threading.Tasks;
@@ -148,7 +149,7 @@ public async Task CreateTask()
148149
Assert.AreEqual("1h", task.Every);
149150
Assert.AreEqual("testing task", task.Description);
150151
Assert.IsNull(task.Cron);
151-
Assert.IsTrue(task.Flux.Equals(flux, StringComparison.OrdinalIgnoreCase));
152+
Assert.That(task.Flux, Is.EqualTo(flux).IgnoreCase);
152153
}
153154

154155
[Test]
@@ -599,7 +600,10 @@ public async Task UpdateTask()
599600
Assert.AreEqual(TaskStatusType.Inactive, updatedTask.Status);
600601
Assert.AreEqual("3m", updatedTask.Every);
601602
Assert.IsNull(updatedTask.Cron);
602-
Assert.AreEqual(updatedTask.Flux, flux);
603+
Assert.AreEqual(0, CultureInfo.CurrentCulture.CompareInfo.Compare(
604+
updatedTask.Flux, flux, CompareOptions.IgnoreSymbols),
605+
$"Queries are not same: '{updatedTask.Flux}', '{flux}'.");
606+
603607
Assert.IsNotNull(updatedTask.UpdatedAt);
604608
}
605609
}

0 commit comments

Comments
 (0)