﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Ayende @ Rahien</title><link>http://ayende.com</link><description>Ayende @ Rahien</description><copyright>Copyright (C) Ayende Rahien  2004 - 2021 (c) 2026</copyright><ttl>60</ttl><item><title>Roy Tate commented on Meta tests</title><description>Function AttributesEndWithAttribute should be corrected ...
  
  
if (type.IsAssignableFrom(typeof(Attribute)))
  
  
should be 
  
  
if (type.IsAssignableFrom(typeof(Attribute)) == false)
  
</description><link>http://ayende.com/3620/meta-tests#comment11</link><guid>http://ayende.com/3620/meta-tests#comment11</guid><pubDate>Wed, 08 Oct 2008 18:10:09 GMT</pubDate></item><item><title>John Rayner commented on Meta tests</title><description>&lt;shrug  We have tests like this to validate some of the conventions we've built up on the project.  For instance, we have an AOP framework in play and so we have a test that validates that constructors are protected and not public.  We have another that checks that properties meant to AOP'd are virtual.
  
  
We've even taken it a step further - for integration tests which connect to the database we setup a transaction at the start of the test and rollback when the test completes, but this is done in a base class.  So we actually have a test that validates that integration tests derive from this base class!!!
  
  
To be honest, I'd rather having a test that fails with a clear message than more subtle problems.
&gt;</description><link>http://ayende.com/3620/meta-tests#comment10</link><guid>http://ayende.com/3620/meta-tests#comment10</guid><pubDate>Thu, 02 Oct 2008 20:15:10 GMT</pubDate></item><item><title>Bunter commented on Meta tests</title><description>This kind of test is perfect for continuous integration as it will reveal convention mistakes for whole team extremely quickly and well, continuously.
</description><link>http://ayende.com/3620/meta-tests#comment9</link><guid>http://ayende.com/3620/meta-tests#comment9</guid><pubDate>Thu, 02 Oct 2008 13:54:00 GMT</pubDate></item><item><title>Morgan commented on Meta tests</title><description>I think you can turn off rules in StyleCop, but you cant change a rule that says that private fields should start with m_ when you want only _.
  
So you have to disable that rule and implement your own custom rule.
</description><link>http://ayende.com/3620/meta-tests#comment8</link><guid>http://ayende.com/3620/meta-tests#comment8</guid><pubDate>Thu, 02 Oct 2008 06:11:22 GMT</pubDate></item><item><title>Judah Himango commented on Meta tests</title><description>I've tried StyleCop. It complained about some things we don't like ("always use 'this.' before accessing members", for example). We had literally several thousand violations. So we didn't pursue it any further.
</description><link>http://ayende.com/3620/meta-tests#comment7</link><guid>http://ayende.com/3620/meta-tests#comment7</guid><pubDate>Thu, 02 Oct 2008 01:22:00 GMT</pubDate></item><item><title>Morgan commented on Meta tests</title><description>Thats a bit hilarius.
  
I use Code Style Enforcer for this, it plays nicely with ReSharper. You can customize the rules.
  
Anyone tried Microsofts StyleCop? 
</description><link>http://ayende.com/3620/meta-tests#comment6</link><guid>http://ayende.com/3620/meta-tests#comment6</guid><pubDate>Wed, 01 Oct 2008 18:43:06 GMT</pubDate></item><item><title>otter commented on Meta tests</title><description>that is very funny, and a very cool idea.  however i don't think i would ever want to include a test like that as part of my continuous integration.  it doesn't seem like it 'belongs' as a true unit test, perhaps it would be best used as a separate test from your standard unit tests.
</description><link>http://ayende.com/3620/meta-tests#comment5</link><guid>http://ayende.com/3620/meta-tests#comment5</guid><pubDate>Wed, 01 Oct 2008 13:11:57 GMT</pubDate></item><item><title>Tobin Harris commented on Meta tests</title><description>They forgot to add
  
  
    [Test]
  
    public void TestNamesAreSmeltCorrectly(){...}
  
  
To catch the spelling error in "FirstLaterOfMethodIsCapitalized".
</description><link>http://ayende.com/3620/meta-tests#comment4</link><guid>http://ayende.com/3620/meta-tests#comment4</guid><pubDate>Wed, 01 Oct 2008 07:32:55 GMT</pubDate></item><item><title>Jason Stangroome commented on Meta tests</title><description>Definitely hilarious. Really should be using MbUnit's TestSuite feature or your preferred test framework's equivalent so you get one test passing or failing for each interface, method, and attribute, not just a test that fails on the first problem it finds.
</description><link>http://ayende.com/3620/meta-tests#comment3</link><guid>http://ayende.com/3620/meta-tests#comment3</guid><pubDate>Wed, 01 Oct 2008 07:27:16 GMT</pubDate></item><item><title>ZeusTheTrueGod commented on Meta tests</title><description>Looks like reinventing the weel
  
May be better put this into PostBuild event?
  
I prefer Agent Smith plugin for Resharper - it shows me when code convention is broken
  
</description><link>http://ayende.com/3620/meta-tests#comment2</link><guid>http://ayende.com/3620/meta-tests#comment2</guid><pubDate>Wed, 01 Oct 2008 07:17:42 GMT</pubDate></item><item><title>Casey commented on Meta tests</title><description>Well I started reading it thinking "how ridiculous" ... but  now I'm not so sure ... in the absense of FxCop or NDepend ... it is one way of ensuring coding standards are being applied, though I grant a rather ingenious one :)
</description><link>http://ayende.com/3620/meta-tests#comment1</link><guid>http://ayende.com/3620/meta-tests#comment1</guid><pubDate>Wed, 01 Oct 2008 07:01:19 GMT</pubDate></item></channel></rss>