Author: nestor
Date: 2007-11-03 05:39:53 -0500 (Sat, 03 Nov 2007)
New Revision: 88778
Modified:
trunk/cecil/gendarme/rules/Gendarme.Rules.Correctness/Test/AvoidConstructorsInStaticTypesTest.cs
trunk/cecil/gendarme/rules/Gendarme.Rules.Correctness/Test/ChangeLog
Log:
2007-11-03 Nestor Salceda <[EMAIL PROTECTED]>
* AvoidConstructorsInStaticTypesTest.cs: Added test for avoid false
positives if the class doesn't contains fields or methods.
Modified:
trunk/cecil/gendarme/rules/Gendarme.Rules.Correctness/Test/AvoidConstructorsInStaticTypesTest.cs
===================================================================
---
trunk/cecil/gendarme/rules/Gendarme.Rules.Correctness/Test/AvoidConstructorsInStaticTypesTest.cs
2007-11-03 10:02:22 UTC (rev 88777)
+++
trunk/cecil/gendarme/rules/Gendarme.Rules.Correctness/Test/AvoidConstructorsInStaticTypesTest.cs
2007-11-03 10:39:53 UTC (rev 88778)
@@ -73,7 +73,10 @@
public static void Method()
{
}
+ }
+ public class EmptyClass
+ {
}
private ITypeRule rule;
@@ -124,7 +127,12 @@
Assert.IsNotNull(messageCollection);
}
-
-
+ [Test]
+ public void TestEmptyClass ()
+ {
+ type =
assembly.MainModule.Types["Test.Rules.Correctness.AvoidConstructorsInStaticTypesTest/EmptyClass"];
+ messageCollection = rule.CheckType (type, new
MinimalRunner ());
+ Assert.IsNull (messageCollection);
+ }
}
}
Modified: trunk/cecil/gendarme/rules/Gendarme.Rules.Correctness/Test/ChangeLog
===================================================================
--- trunk/cecil/gendarme/rules/Gendarme.Rules.Correctness/Test/ChangeLog
2007-11-03 10:02:22 UTC (rev 88777)
+++ trunk/cecil/gendarme/rules/Gendarme.Rules.Correctness/Test/ChangeLog
2007-11-03 10:39:53 UTC (rev 88778)
@@ -1,3 +1,8 @@
+2007-11-03 Nestor Salceda <[EMAIL PROTECTED]>
+
+ * AvoidConstructorsInStaticTypesTest.cs: Added test for avoid false
+ positives if the class doesn't contains fields or methods.
+
2007-10-07 Sebastien Pouliot <[EMAIL PROTECTED]>
* AvoidConstructorsInStaticTypesTest.cs: Unit tests (Lukasz Knop,
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches