Quantcast
Channel: YouTrackReSharper (RSRP) - Bug and Issue Tracker
Viewing all articles
Browse latest Browse all 106942

RSRP-149022: Variable used by NUnit TestCaseSource is reported as unused

$
0
0
Reporter Oleg Gerovich (oleg.gerovich) Oleg Gerovich (oleg.gerovich)
Created Jan 20, 2010 9:19:04 PM
Updated Jan 11, 2012 12:12:54 AM
Priority Critical
Type Bug
Fix versions Next Major
State Open
Assignee Victor Kropp (victor.kropp)
Subsystem Code Analysis
Affected versions 5.0, 6.0, 6.1
Fixed in build No Fixed in build
AllTests.cs
using NUnit.Framework;

namespace AllTests
{
    [TestFixture]
    public class MyTest
    {
        private static string[] _myTestData = { "hello", "" };

        [Test, TestCaseSource("_myTestData")]
        public void MyTestFunction(string s)
        {
            Assert.IsNotEmpty(s);
        }
    }
}


_myTestData is grayed out. ReSharper suggests to remove or comment unused variable, which should not be the case.

Viewing all articles
Browse latest Browse all 106942

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>