Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Kevin B <[email protected]>
  • Loading branch information
BenjaminMichaelis and Keboo authored Nov 30, 2023
1 parent 9d8b96b commit c48b933
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ namespace IntelliTect.Multitool.Extensions.Tests;

public class SystemLinqExtensionsTests
{
private static readonly List<string?> stringsWithSomeNullValues = ["Hello", null, "World", null, "!"];
private static readonly List<string?> _stringsWithSomeNullValues = ["Hello", null, "World", null, "!"];

[Fact]
public void WhereNotNull_ReturnsOnlyNonNullValues()
{
IEnumerable<string> nonNullableStringType = stringsWithSomeNullValues.WhereNotNull();

Check failure on line 12 in IntelliTect.Multitool.Tests/Extensions/SystemLinqExtensionsTests.cs

View workflow job for this annotation

GitHub Actions / build-and-test on ubuntu-latest

The name 'stringsWithSomeNullValues' does not exist in the current context

Check failure on line 12 in IntelliTect.Multitool.Tests/Extensions/SystemLinqExtensionsTests.cs

View workflow job for this annotation

GitHub Actions / build-and-test on ubuntu-latest

The name 'stringsWithSomeNullValues' does not exist in the current context

Check failure on line 12 in IntelliTect.Multitool.Tests/Extensions/SystemLinqExtensionsTests.cs

View workflow job for this annotation

GitHub Actions / build-and-test on ubuntu-latest

The name 'stringsWithSomeNullValues' does not exist in the current context

Check failure on line 12 in IntelliTect.Multitool.Tests/Extensions/SystemLinqExtensionsTests.cs

View workflow job for this annotation

GitHub Actions / build-and-test on ubuntu-latest

The name 'stringsWithSomeNullValues' does not exist in the current context

Check failure on line 12 in IntelliTect.Multitool.Tests/Extensions/SystemLinqExtensionsTests.cs

View workflow job for this annotation

GitHub Actions / build-and-test on ubuntu-latest

The name 'stringsWithSomeNullValues' does not exist in the current context

Check failure on line 12 in IntelliTect.Multitool.Tests/Extensions/SystemLinqExtensionsTests.cs

View workflow job for this annotation

GitHub Actions / build-and-test on windows-latest

The name 'stringsWithSomeNullValues' does not exist in the current context

Check failure on line 12 in IntelliTect.Multitool.Tests/Extensions/SystemLinqExtensionsTests.cs

View workflow job for this annotation

GitHub Actions / build-and-test on windows-latest

The name 'stringsWithSomeNullValues' does not exist in the current context

Check failure on line 12 in IntelliTect.Multitool.Tests/Extensions/SystemLinqExtensionsTests.cs

View workflow job for this annotation

GitHub Actions / build-and-test on windows-latest

The name 'stringsWithSomeNullValues' does not exist in the current context

Check failure on line 12 in IntelliTect.Multitool.Tests/Extensions/SystemLinqExtensionsTests.cs

View workflow job for this annotation

GitHub Actions / build-and-test on windows-latest

The name 'stringsWithSomeNullValues' does not exist in the current context

Check failure on line 12 in IntelliTect.Multitool.Tests/Extensions/SystemLinqExtensionsTests.cs

View workflow job for this annotation

GitHub Actions / build-and-test on windows-latest

The name 'stringsWithSomeNullValues' does not exist in the current context

Check failure on line 12 in IntelliTect.Multitool.Tests/Extensions/SystemLinqExtensionsTests.cs

View workflow job for this annotation

GitHub Actions / build-and-test on macOS-latest

The name 'stringsWithSomeNullValues' does not exist in the current context

Check failure on line 12 in IntelliTect.Multitool.Tests/Extensions/SystemLinqExtensionsTests.cs

View workflow job for this annotation

GitHub Actions / build-and-test on macOS-latest

The name 'stringsWithSomeNullValues' does not exist in the current context

Check failure on line 12 in IntelliTect.Multitool.Tests/Extensions/SystemLinqExtensionsTests.cs

View workflow job for this annotation

GitHub Actions / build-and-test on macOS-latest

The name 'stringsWithSomeNullValues' does not exist in the current context

Check failure on line 12 in IntelliTect.Multitool.Tests/Extensions/SystemLinqExtensionsTests.cs

View workflow job for this annotation

GitHub Actions / build-and-test on macOS-latest

The name 'stringsWithSomeNullValues' does not exist in the current context

Check failure on line 12 in IntelliTect.Multitool.Tests/Extensions/SystemLinqExtensionsTests.cs

View workflow job for this annotation

GitHub Actions / build-and-test on macOS-latest

The name 'stringsWithSomeNullValues' does not exist in the current context
Assert.All(stringsWithSomeNullValues.WhereNotNull(), s => Assert.NotNull(s));

Check failure on line 13 in IntelliTect.Multitool.Tests/Extensions/SystemLinqExtensionsTests.cs

View workflow job for this annotation

GitHub Actions / build-and-test on ubuntu-latest

The name 'stringsWithSomeNullValues' does not exist in the current context

Check failure on line 13 in IntelliTect.Multitool.Tests/Extensions/SystemLinqExtensionsTests.cs

View workflow job for this annotation

GitHub Actions / build-and-test on ubuntu-latest

The name 'stringsWithSomeNullValues' does not exist in the current context

Check failure on line 13 in IntelliTect.Multitool.Tests/Extensions/SystemLinqExtensionsTests.cs

View workflow job for this annotation

GitHub Actions / build-and-test on ubuntu-latest

The name 'stringsWithSomeNullValues' does not exist in the current context

Check failure on line 13 in IntelliTect.Multitool.Tests/Extensions/SystemLinqExtensionsTests.cs

View workflow job for this annotation

GitHub Actions / build-and-test on ubuntu-latest

The name 'stringsWithSomeNullValues' does not exist in the current context

Check failure on line 13 in IntelliTect.Multitool.Tests/Extensions/SystemLinqExtensionsTests.cs

View workflow job for this annotation

GitHub Actions / build-and-test on ubuntu-latest

The name 'stringsWithSomeNullValues' does not exist in the current context

Check failure on line 13 in IntelliTect.Multitool.Tests/Extensions/SystemLinqExtensionsTests.cs

View workflow job for this annotation

GitHub Actions / build-and-test on windows-latest

The name 'stringsWithSomeNullValues' does not exist in the current context

Check failure on line 13 in IntelliTect.Multitool.Tests/Extensions/SystemLinqExtensionsTests.cs

View workflow job for this annotation

GitHub Actions / build-and-test on windows-latest

The name 'stringsWithSomeNullValues' does not exist in the current context

Check failure on line 13 in IntelliTect.Multitool.Tests/Extensions/SystemLinqExtensionsTests.cs

View workflow job for this annotation

GitHub Actions / build-and-test on windows-latest

The name 'stringsWithSomeNullValues' does not exist in the current context

Check failure on line 13 in IntelliTect.Multitool.Tests/Extensions/SystemLinqExtensionsTests.cs

View workflow job for this annotation

GitHub Actions / build-and-test on windows-latest

The name 'stringsWithSomeNullValues' does not exist in the current context

Check failure on line 13 in IntelliTect.Multitool.Tests/Extensions/SystemLinqExtensionsTests.cs

View workflow job for this annotation

GitHub Actions / build-and-test on windows-latest

The name 'stringsWithSomeNullValues' does not exist in the current context

Check failure on line 13 in IntelliTect.Multitool.Tests/Extensions/SystemLinqExtensionsTests.cs

View workflow job for this annotation

GitHub Actions / build-and-test on macOS-latest

The name 'stringsWithSomeNullValues' does not exist in the current context

Check failure on line 13 in IntelliTect.Multitool.Tests/Extensions/SystemLinqExtensionsTests.cs

View workflow job for this annotation

GitHub Actions / build-and-test on macOS-latest

The name 'stringsWithSomeNullValues' does not exist in the current context

Check failure on line 13 in IntelliTect.Multitool.Tests/Extensions/SystemLinqExtensionsTests.cs

View workflow job for this annotation

GitHub Actions / build-and-test on macOS-latest

The name 'stringsWithSomeNullValues' does not exist in the current context

Check failure on line 13 in IntelliTect.Multitool.Tests/Extensions/SystemLinqExtensionsTests.cs

View workflow job for this annotation

GitHub Actions / build-and-test on macOS-latest

The name 'stringsWithSomeNullValues' does not exist in the current context

Check failure on line 13 in IntelliTect.Multitool.Tests/Extensions/SystemLinqExtensionsTests.cs

View workflow job for this annotation

GitHub Actions / build-and-test on macOS-latest

The name 'stringsWithSomeNullValues' does not exist in the current context
Assert.Equal(new List<string> { "Hello", "World", "!" }, nonNullableStringType);
Assert.Equal(["Hello", "World", "!" ], nonNullableStringType);
}
}

0 comments on commit c48b933

Please sign in to comment.