nunit.analyzers icon indicating copy to clipboard operation
nunit.analyzers copied to clipboard

Roslyn analyzers for writing unit tests with NUnit

Results 114 nunit.analyzers issues
Sort by recently updated
recently updated
newest added

I wrote a patch to run nunit.analyzers's tests on GitHub Actions. This enables automated testing with CI. see also: CI's log - https://github.com/get-me-power/nunit.analyzers/actions/runs/3032762761

This might be similar to an issue [I just submitted](https://github.com/nunit/nunit.analyzers/issues/474) Write this test: ```csharp [Test] public static void EqualityWithSpans() { var span1 = new[] { 1 }.AsSpan(); var span2 =...

To reproduce this, create a class library for .NET 6 with the following NUnit references: ``` ``` Create the following test: ```csharp [Test] public static void TestSpan() { var span...

bug

Hello, I am writing to notify you that your analyzer mark a code as not compatible types for EqualTo, but it is not true . for code: ` Assert.That(result, Is.EqualTo(Error.EntraAssignmentNotFound));`...

Consider the following (mostly similar) tests: ```cs [Test] public void VerifyAreEqualFixWithMessageAndParamsInStandardOrder1() { var code = TestUtility.WrapMethodInClassNamespaceAndAddUsings(@" public void TestMethod() { ↓ClassicAssert.AreEqual(""expected"", ""actual"", ""{0}"", ""first""); }"); var fixedCode = TestUtility.WrapMethodInClassNamespaceAndAddUsings(@" public...

I found another bug while fixing the code, but in the interest of making the PR more targeted and reviewable, I'll file another issue and another PR to fix that....

See discussion in #603 - https://github.com/nunit/nunit.analyzers/issues/603#issuecomment-1739266935 and above > In the analyzers repo we (currently) use AppVeyor to do the build artifacts that we release. The GitHub action were offered...

is:build

```cs // before the code fix CollectionAssert.AreEquivalent( new[] { "This is such a long sentence that I don't want the other parameter on the same line." }, new[] { "This...

bug

Given the following (note the order of named parameters) ```cs [Test] public void Test1() { var actual = 1; Assert.AreEqual(actual: actual, expected: 1); } ``` `NUnit.Analyzers` cannot fix `NUnit2005` correctly....

bug