private void CheckMethods(IMethodRule rule, ICollection methods, Runner runner)
 {
     foreach (MethodDefinition method in methods)
     {
         AddExistingMessages(rule.CheckMethod(method, runner));
     }
 }
        public void FixtureSetUp()
        {
            string unit = Assembly.GetExecutingAssembly().Location;

            assembly          = AssemblyFactory.GetAssembly(unit);
            methodRule        = new ToStringReturnsNullRule();
            messageCollection = null;
        }
        public void FixtureSetUp()
        {
            string unit = Assembly.GetExecutingAssembly().Location;

            assembly = AssemblyDefinition.ReadAssembly(unit);
            rule     = new ReviewNonVirtualMethodWithInheritanceDemandRule();
            runner   = new TestRunner(rule);
        }
		public void FixtureSetUp()
		{
			string unit = Assembly.GetExecutingAssembly().Location;
			assembly = AssemblyFactory.GetAssembly(unit);
			module = assembly.MainModule;
			type = module.Types["Test.Rules.Correctness.UseValueInPropertySetterTest/Item"];
			rule = new UseValueInPropertySetterRule();
		}
		public void FixtureSetUp()
		{
			string unit = Assembly.GetExecutingAssembly().Location;
			assembly = AssemblyFactory.GetAssembly(unit);
			module = assembly.MainModule;
			type = module.Types["Test.Rules.Performance.DontIgnoreMethodResultTest/Item"];
			rule = new DontIgnoreMethodResultRule();
		}
        public void FixtureSetUp()
        {
            string unit = Assembly.GetExecutingAssembly().Location;

            assembly          = AssemblyFactory.GetAssembly(unit);
            methodRule        = new UsingStringLengthInsteadOfCheckingEmptyStringRule();
            messageCollection = null;
        }
示例#7
0
        public void FixtureSetUp()
        {
            string unit = Assembly.GetExecutingAssembly().Location;

            assembly          = AssemblyFactory.GetAssembly(unit);
            methodRule        = new AvoidUncalledPrivateCodeRule();
            messageCollection = null;
        }
示例#8
0
        public void FixtureSetUp()
        {
            string unit = Assembly.GetExecutingAssembly().Location;

            assembly          = AssemblyFactory.GetAssembly(unit);
            methodRule        = new CallingEqualsWithNullArgRule();
            messageCollection = null;
        }
        public void FixtureSetUp()
        {
            string unit = Assembly.GetExecutingAssembly().Location;

            assembly          = AssemblyFactory.GetAssembly(unit);
            rule              = new AvoidUnsafeSQLQueriesRule();
            messageCollection = null;
        }
		public void FixtureSetUp ()
		{
			string unit = Assembly.GetExecutingAssembly ().Location;
			assembly = AssemblyFactory.GetAssembly (unit);
			rule = new DontSwallowErrorsCatchingNonspecificExceptions ();
			type = assembly.MainModule.Types ["Test.Rules.Exceptions.DontSwallowErrorsCatchingNonspecificExceptionsTest"];
			messageCollection = null;
		}
示例#11
0
        public void FixtureSetUp()
        {
            string unit = Assembly.GetExecutingAssembly().Location;

            assembly          = AssemblyFactory.GetAssembly(unit);
            methodRule        = new DetectNonAlphaNumericsInTypeNamesRule();
            typeRule          = new DetectNonAlphaNumericsInTypeNamesRule();
            messageCollection = null;
        }
        public void FixtureSetUp()
        {
            string unit = Assembly.GetExecutingAssembly().Location;

            assembly          = AssemblyFactory.GetAssembly(unit);
            type              = assembly.MainModule.Types["Test.Rules.Smells.AvoidLongParameterListsTest"];
            rule              = new AvoidLongParameterListsRule();
            messageCollection = null;
        }
示例#13
0
        public void FixtureSetUp()
        {
            string unit = Assembly.GetExecutingAssembly().Location;

            assembly = AssemblyFactory.GetAssembly(unit);
            module   = assembly.MainModule;
            type     = module.Types["Test.Rules.Correctness.UseValueInPropertySetterTest/Item"];
            rule     = new UseValueInPropertySetterRule();
        }
        public void FixtureSetUp()
        {
            string unit = Assembly.GetExecutingAssembly().Location;

            assembly = AssemblyFactory.GetAssembly(unit);
            module   = assembly.MainModule;
            type     = module.Types["Test.Rules.Performance.AvoidToStringOnStringsTest/Item"];
            rule     = new AvoidToStringOnStringsRule();
        }
示例#15
0
        public void FixtureSetUp()
        {
            string unit = Assembly.GetExecutingAssembly().Location;

            assembly = AssemblyFactory.GetAssembly(unit);
            module   = assembly.MainModule;
            type     = module.Types["Test.Rules.Performance.DontIgnoreMethodResultTest/Item"];
            rule     = new DontIgnoreMethodResultRule();
        }
示例#16
0
        public void FixtureSetUp()
        {
            string unit = Assembly.GetExecutingAssembly().Location;

            assembly          = AssemblyFactory.GetAssembly(unit);
            rule              = new DontSwallowErrorsCatchingNonspecificExceptions();
            type              = assembly.MainModule.Types ["Test.Rules.Exceptions.DontSwallowErrorsCatchingNonspecificExceptionsTest"];
            messageCollection = null;
        }
        public void FixtureSetUp()
        {
            string unit = Assembly.GetExecutingAssembly().Location;

            assembly = AssemblyFactory.GetAssembly(unit);
            module   = assembly.MainModule;
            type     = module.Types["Test.Rules.Correctness.FloatComparisonRuleTest/Item"];
            rule     = new FloatComparisonRule();
        }
		public void FixtureSetUp()
		{
			string unit = Assembly.GetExecutingAssembly().Location;
			assembly = AssemblyFactory.GetAssembly(unit);
			module = assembly.MainModule;
			type = module.Types["Test.Rules.Performance.AvoidToStringOnStringsTest/Item"];
			rule = new AvoidToStringOnStringsRule();
		}
		public void FixtureSetUp ()
		{
			string unit = Assembly.GetExecutingAssembly ().Location;
			assembly = AssemblyFactory.GetAssembly (unit);
			methodRule = new DetectNonAlphaNumericsInTypeNamesRule();
			typeRule = new DetectNonAlphaNumericsInTypeNamesRule();
			messageCollection = null;
		}
		public void FixtureSetUp()
		{
			string unit = Assembly.GetExecutingAssembly().Location;
			assembly = AssemblyFactory.GetAssembly(unit);
			module = assembly.MainModule;
			type = module.Types["Test.Rules.Correctness.FloatComparisonRuleTest/Item"];
			rule = new FloatComparisonRule();
		}
		private void CheckMethods (IMethodRule rule, ICollection methods, Runner runner) 
		{
			foreach (MethodDefinition method in methods) {
				AddExistingMessages (rule.CheckMethod (method, runner));
			}
		}
		public void FixtureSetUp ()
		{
			string unit = Assembly.GetExecutingAssembly ().Location;
			assembly = AssemblyFactory.GetAssembly (unit);
			methodRule = new ToStringReturnsNullRule();
			messageCollection = null;
		}
		public void FixtureSetUp ()
		{
			string unit = Assembly.GetExecutingAssembly ().Location;
			assembly = AssemblyDefinition.ReadAssembly (unit);
			rule = new ReviewNonVirtualMethodWithInheritanceDemandRule ();
			runner = new TestRunner (rule);
		}
		public void FixtureSetUp ()
		{
			string unit = Assembly.GetExecutingAssembly ().Location;
			assembly = AssemblyFactory.GetAssembly (unit);
			methodRule = new AvoidUncalledPrivateCodeRule ();
			messageCollection = null;
		}
		public void FixtureSetUp () 
		{
			string unit = Assembly.GetExecutingAssembly ().Location;
			assembly = AssemblyFactory.GetAssembly (unit);
			rule = new AvoidUnusedParametersRule ();
			messageCollection = null;
		}
		public void FixtureSetUp ()
		{
			string unit = Assembly.GetExecutingAssembly ().Location;
			assembly = AssemblyFactory.GetAssembly (unit);
			methodRule = new EqualShouldHandleNullArgRule ();
			messageCollection = null;
		}
		public void FixtureSetUp ()
		{
			string unit = Assembly.GetExecutingAssembly ().Location;
			assembly = AssemblyFactory.GetAssembly (unit);
			methodRule = new UsingStringLengthInsteadOfCheckingEmptyStringRule();
			messageCollection = null;
		}