diff --git a/Directory.Packages.props b/Directory.Packages.props
index 24087e2..3369a2a 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -3,8 +3,8 @@
true
-
-
+
+
diff --git a/Source/aweXpect.Reflection/Collections/AccessModifiersExtensions.cs b/Source/aweXpect.Reflection/Collections/AccessModifiersExtensions.cs
index a21b29a..06f5d08 100644
--- a/Source/aweXpect.Reflection/Collections/AccessModifiersExtensions.cs
+++ b/Source/aweXpect.Reflection/Collections/AccessModifiersExtensions.cs
@@ -78,7 +78,7 @@ public static string GetString(this AccessModifiers accessModifier, string suffi
#if NET8_0_OR_GREATER
return string.Join(", ", modifiers[..^1]) + " or " + modifiers[^1] + suffix;
#else
- return string.Join(", ", modifiers.Take(modifiers.Count - 1)) + " or " + modifiers[^1] + suffix;
+ return string.Join(", ", modifiers.Take(modifiers.Count - 1)) + " or " + modifiers[modifiers.Count - 1] + suffix;
#endif
}
}
diff --git a/Source/aweXpect.Reflection/Helpers/StringHelpers.cs b/Source/aweXpect.Reflection/Helpers/StringHelpers.cs
index 8ee4b5a..c85de44 100644
--- a/Source/aweXpect.Reflection/Helpers/StringHelpers.cs
+++ b/Source/aweXpect.Reflection/Helpers/StringHelpers.cs
@@ -50,7 +50,7 @@ public static string TrimCommonWhiteSpace(this string value)
{
if (lines[l][i] != commonWhiteSpace[i])
{
- commonWhiteSpace = commonWhiteSpace[..i];
+ commonWhiteSpace = commonWhiteSpace.Substring(0, i);
break;
}
}
@@ -60,7 +60,7 @@ public static string TrimCommonWhiteSpace(this string value)
sb.Append(lines[0]);
foreach (string? line in lines.Skip(1))
{
- sb.Append('\n').Append(line[commonWhiteSpace.Length..]);
+ sb.Append('\n').Append(line.Substring(commonWhiteSpace.Length));
}
if (lines.Length == 2)
diff --git a/Tests/aweXpect.Reflection.Tests/ThatType.IsGeneric.WithArgument.Tests.cs b/Tests/aweXpect.Reflection.Tests/ThatType.IsGeneric.WithArgument.Tests.cs
index 1864ac7..a029912 100644
--- a/Tests/aweXpect.Reflection.Tests/ThatType.IsGeneric.WithArgument.Tests.cs
+++ b/Tests/aweXpect.Reflection.Tests/ThatType.IsGeneric.WithArgument.Tests.cs
@@ -213,11 +213,11 @@ async Task Act()
await That(Act).ThrowsException()
.OnlyIf(!expectSuccess)
- .WithMessage($$"""
- Expected that subject
- is generic with argument of type ThatType.BaseClass and name equal to "{{name}}",
- but it was generic ThatType.GenericClassWithTwoArguments<, >
- """);
+ .WithMessage($"""
+ Expected that subject
+ is generic with argument of type ThatType.BaseClass and name equal to "{name}",
+ but it was generic ThatType.GenericClassWithTwoArguments
+ """);
}
[Theory]