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;
        }
Example #7
0
        public void FixtureSetUp()
        {
            string unit = Assembly.GetExecutingAssembly().Location;

            assembly          = AssemblyFactory.GetAssembly(unit);
            methodRule        = new AvoidUncalledPrivateCodeRule();
            messageCollection = null;
        }
Example #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;
		}
Example #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;
        }
Example #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();
        }
Example #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();
        }
Example #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;
		}