コード例 #1
0
        public void TestSuggestionForPascalCase()
        {
            var rule = new NamingRule(AffectedEntity.Class);

            rule.NamingStyle = NamingStyle.PascalCase;
            System.Collections.Generic.IList <string> suggestedNames;
            rule.GetErrorMessage(new TestRefactoringContext(null, TextLocation.Empty, null), "pascalCase_12_____12323", out suggestedNames);
            Assert.IsTrue(suggestedNames.Contains("PascalCase_12_12323"));
        }
コード例 #2
0
        public void TestSuggestionForPascalCaseWithLowerStart()
        {
            var rule = new NamingRule(AffectedEntity.Class);

            rule.NamingStyle = NamingStyle.PascalCaseWithLowerLetterUnderscore;
            System.Collections.Generic.IList <string> suggestedNames;
            rule.GetErrorMessage(new TestRefactoringContext(null, TextLocation.Empty, null), "PascalCase_UnderscoreTolerant", out suggestedNames);
            Assert.IsTrue(suggestedNames.Contains("PascalCase_underscoreTolerant"));
        }
コード例 #3
0
        public void TestCase70925()
        {
            var rule = new NamingRule(AffectedEntity.Field);

            rule.NamingStyle = NamingStyle.PascalCase;
            System.Collections.Generic.IList <string> suggestedNames;
            rule.GetErrorMessage(new TestRefactoringContext(null, TextLocation.Empty, null), "_taskStatus", out suggestedNames);
            Assert.IsTrue(suggestedNames.Contains("TaskStatus"));
        }
コード例 #4
0
		public void TestCase70925()
		{
			var rule = new NamingRule(AffectedEntity.Field);
			rule.NamingStyle = NamingStyle.PascalCase;
			System.Collections.Generic.IList<string> suggestedNames;
			rule.GetErrorMessage(new TestRefactoringContext (null, TextLocation.Empty, null), "_taskStatus", out suggestedNames); 
			Assert.IsTrue(suggestedNames.Contains("TaskStatus"));
		}
コード例 #5
0
		public void TestSuggestionForPascalCase()
		{
			var rule = new NamingRule(AffectedEntity.Class);
			rule.NamingStyle = NamingStyle.PascalCase;
			System.Collections.Generic.IList<string> suggestedNames;
			rule.GetErrorMessage(new TestRefactoringContext (null, TextLocation.Empty, null), "pascalCase_12_____12323", out suggestedNames); 
			Assert.IsTrue(suggestedNames.Contains("PascalCase_12_12323"));
		}
コード例 #6
0
		public void TestSuggestionForPascalCaseWithLowerStart()
		{
			var rule = new NamingRule(AffectedEntity.Class);
			rule.NamingStyle = NamingStyle.PascalCaseWithLowerLetterUnderscore;
			System.Collections.Generic.IList<string> suggestedNames;
			rule.GetErrorMessage(new TestRefactoringContext (null, TextLocation.Empty, null), "PascalCase_UnderscoreTolerant", out suggestedNames); 
			Assert.IsTrue(suggestedNames.Contains("PascalCase_underscoreTolerant"));
		}