Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7588811
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T20:00:58+00:00 2026-05-30T20:00:58+00:00

I have just recently started using ReSharper and am looking for a way of

  • 0

I have just recently started using ReSharper and am looking for a way of resolving a particular issue I have with the “Type argument specification is redundant” tooltip/quickfix. When writing unit tests I have been using Assert.AreEqual<string>(x, y) and ReSharper flags the usage of <string> as redundant. I would like to not have that flagged as redundant for that or any similar usages in my unit tests. Is there any way to disable this particular usage case (which would be extensible to the other assertions)? Please note, I would like to avoid the suppress with comment because of the large amount of noise that would create in the source file. I also don’t want to disable the feature entirely.

For clarification, the reason this particular case is incorrectly flagged in my opinion is because the usage of the generic causes the error of mismatched types in the assert to be flagged at compile time and not at test runtime. I would like to keep this fail early behavior but get rid of all the extra noise this causes in basically every test I write.

Thanks

Edit: There has been a question about what the test contents would look like so I’m providing an example of one such assertion that is causing ReSharper to flag the redundancy.

[TestMethod]
public void ViewModelConstructor_NullProgram_SetsVisibilityToCollapsed()
{
    _currentProgram = null; //Set condition under test
    var Target = TargetMaker(); //Use shared constructor code in all tests
    Assert.AreEqual<System.Windows.Visibility>(System.Windows.Visibility.Collapsed, Target.SectionVisibility);
}

Edit 2: Here’s an example of the before and after ReSharper’s suggested change. These two pieces of code show very different results. I’ve noted the different behaviors in the test function names.

class ClassUnderTest
{
    public string fieldUnderTest { get; set; }
    public ClassUnderTest()
    {
        fieldUnderTest = "New Value";
    }
}


[TestClass()]
public class ClassUnderTestTest
{

    [TestMethod()]
    public void ClassUnderTestConstructorTest_FailsTest()
    {
        ClassUnderTest target = new ClassUnderTest();
        Assert.AreEqual(true, target.fieldUnderTest);
    }

    [TestMethod()]
    public void ClassUnderTestConstructorTest_WontCompile()
    {
        ClassUnderTest target = new ClassUnderTest();
        Assert.AreEqual<string>(true, target.fieldUnderTest);
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T20:00:59+00:00Added an answer on May 30, 2026 at 8:00 pm

    Resharper 6.1 introduces the concept of settings-“layers”. Here’s a blog-post that teaches you how to setup per-project settings, which is what you appear to want.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have recently started using ReSharper which is a fantastic tool. Today I came
I recently started using android actionbars and contextual action bars (CAB). I have just
I've just recently started developing a site for iPhone using jQTouch, and have the
I've just recently started using VS2008 for a new tools project, and have been
I've only just started using Castle Windsor recently and have a question. Suppose I
I have just recently started using NetBeans IDE (6.9.1) and have used it to
I have programmed in Python for a while, and just recently started using Ruby
I have just started C very recently and I have been asked to answer
I am just getting started with Silverlight and have recently added a Silverlight project
I have just recently discovered how much I enjoy developing code the TDD way:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.