From fd15ab6632cc70aa7c1c7ac0186939bf6610bac6 Mon Sep 17 00:00:00 2001 From: Dimitar Dobrev Date: Sat, 23 May 2020 16:16:54 +0300 Subject: [PATCH] Make a test localization-independent of the IDE Signed-off-by: Dimitar Dobrev --- tests/CSharp/CSharp.Tests.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/CSharp/CSharp.Tests.cs b/tests/CSharp/CSharp.Tests.cs index ff438d49..7bcee686 100644 --- a/tests/CSharp/CSharp.Tests.cs +++ b/tests/CSharp/CSharp.Tests.cs @@ -553,7 +553,9 @@ public unsafe class CSharpTests : GeneratorTestFixture foosMore[1] = new Foo(); var ex = Assert.Throws(() => bar.Foos = foosMore); Assert.AreEqual("value", ex.ParamName); - Assert.AreEqual("The dimensions of the provided array don't match the required size." + Environment.NewLine + "Parameter name: value", ex.Message); + string[] message = ex.Message.Split( + Environment.NewLine.ToCharArray(), StringSplitOptions.RemoveEmptyEntries); + Assert.AreEqual("The dimensions of the provided array don't match the required size.", message[0]); foreach (Foo foo in foosMore) {