title: VS 2010 Database unit testing with custom testcondition
body: <p>After reading the following article <a href="http://msdn.microsoft.com/en-us/library/aa833409.aspx" rel="nofollow">Create Test Conditions for the Database Unit Test Designer</a> on MSDN i decided to try create a custom test condition for my database unit tests</p>
  
  <ul>
  <li>Ive met the requirements of either Ultimate or Premium as my environment.</li>
  <li>Created a new class lib project and referenced <code>Microsoft.Data.Schema.UnitTesting</code> and <code>Microsoft.Data.Schema</code> as well as <code>Microsoft.Data.Schema.Sql</code></li>
  <li>I created a class inheriting from TestCondition and called it ExpectedSqlException defined as the following</li>
  </ul>
  
  <p>EDIT:</p>
  
  <pre><code>     [DisplayName("Some test condition")] 
       [DatabaseSchemaProviderCompatibility(null)] 
       public class SomeTestCondition : TestCondition
       {
           public override void Assert(System.Data.Common.DbConnection validationConnection, Microsoft.Data.Schema.UnitTesting.ExecutionResult[] results)
           {
           ...
           }
      } 
  </code></pre>
  
  <ul>
  <li><p>Following the <a href="http://msdn.microsoft.com/en-us/library/aa833409.aspx" rel="nofollow">how to</a> I then created the extentions.xml file that i then  placed in <code>%ProgramFiles%\Microsoft Visual Studio 10.0\VSTSDB\Extensions</code> and it looks like so (the type key/value is my assembly public info, this should be different for yours)</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;    
  &lt;extensions assembly="" version="1" xmlns="urn:Microsoft.Data.Schema.Extensions" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:Microsoft.Data.Schema.Extensions Microsoft.Data.Schema.Extensions.xsd"&gt;    
      &lt;extension type="SomeTestCondition.SomeTestCondition" assembly="SomeTestCondition, Version=1.0.0.0, Culture=neutral, PublicKeyToken=01a289ad96d7a8a8" enabled="true" /&gt;    
  &lt;/extensions&gt;
  </code></pre></li>
  <li><p>And registered the assembly into the GAC after signing the assembly</p></li>
  </ul>
  
  <p>So now with my new TestCondition i should be able to use it within the database unit testing designer to define expectations, BUT ALAS IT DOES NOT WORK :(</p>
  
  <p>Can someone help me with this? what am i missing? </p>