title: xUnit cannot test DbConnection Type with IsType
body: <p>I am writing an xUnit test for my connectionFactory. like so:</p>
  
  <pre><code>namespace Common.Tests.Services
  {
      public class DBConnectionFactoryTest : IDisposable
      {
          private readonly IConfiguration testConfig;
          private DBConnectionFactory testDBConnectionFactory;
          private DbConnection testDBConnection;
  
         public DBConnectionFactoryTest()
          {
              // Read the configuration
              testConfig = new TestConfigurator().Configuration;
          }
          [Fact]
          public void ShouldConnect()
          {
              //Arrange
              testDBConnectionFactory = new DBConnectionFactory(testConfig);
  
              //Act
              testDBConnection = testDBConnectionFactory.CreateConnection();
  
              //Assert
              Assert.IsType&lt;DbConnection&gt;(testDBConnection);
              Assert.IsType(typeof(DbConnection),testDBConnection);
              Assert.IsType(DbConnection,testDBConnection);
          }
  
          public void Dispose()
          {
              testDBConnection.Dispose();
          }
      }
  }
  </code></pre>
  
  <p>It continues to complain that I cannot test against <code>DbConnection</code>. I want to test that a <code>DbConnection</code> was  established. It is asking me to change it to <code>IsAssignablefrom</code> but that does not seem to be the same as I want.
  I don't want to just have the test be successful without assurance that the connection was established. 
  Also is it enough to test this or should I actually open the connection to be sure?</p>