Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="aweXpect" Version="2.26.0" />
<PackageVersion Include="aweXpect.Core" Version="2.24.0" />
<PackageVersion Include="aweXpect" Version="2.31.0" />
<PackageVersion Include="aweXpect.Core" Version="2.28.0" />
</ItemGroup>
<ItemGroup>
<PackageVersion Include="Nullable" Version="1.3.1" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
4 changes: 2 additions & 2 deletions Source/aweXpect.Reflection/Helpers/StringHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
{
if (lines[l][i] != commonWhiteSpace[i])
{
commonWhiteSpace = commonWhiteSpace[..i];
commonWhiteSpace = commonWhiteSpace.Substring(0, i);
break;
}
}
Expand All @@ -60,7 +60,7 @@
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));

Check warning on line 63 in Source/aweXpect.Reflection/Helpers/StringHelpers.cs

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Prefer 'AsSpan' over 'Substring' when span-based overloads are available

See more on https://sonarcloud.io/project/issues?id=Testably_aweXpect.Reflection&issues=AZ394lNlAdkcZ6Vv-wK6&open=AZ394lNlAdkcZ6Vv-wK6&pullRequest=180
}

if (lines.Length == 2)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
Loading