How to use bdd naming style with Resharper 4.5?

前端 未结 8 1711
你的背包
你的背包 2021-02-19 07:40

I just upgraded to Resharper 4.5 and now see that all my BDDish test methods are marked as not conforming to the naming standard. My naming convention is like this:

<         


        
8条回答
  •  时光取名叫无心
    2021-02-19 08:39

    You could use

    // ReSharper disable InconsistentNaming

    // ReSharper restore InconsistentNaming

    around the extremities of each class. e.g

    // ReSharper disable InconsistentNaming
    namespace bob
    {
        [TestClass]
        public class MyTestClass
        {
            [TestMethod] 
            public void Test_Test()
            {
            }
        }
    }
    // ReSharper restore InconsistentNaming
    

    This however will remove all naming warnings, and not just those on the Method name(s).

提交回复
热议问题