public void SqlTrannectionShouldCloseItsConnectionWhenItIsDisposed()
 {
     using (var testSubject = new SqlServerTranection(LocalMasterDb))
     {
         testSubject.IsOpen.Should().BeFalse();
         testSubject.ExecuteScalar<int>("select count(*) from sys.objects;").Result.Should().BeGreaterThan(10);
         testSubject.IsOpen.Should().BeTrue();
         testSubject.Dispose();
         testSubject.IsOpen.Should().BeFalse();
     }
 }
 public void SqlTrannectionShouldExecuteNonQuery()
 {
     using (var testSubject = new SqlServerTranection(LocalMasterDb))
     {
         testSubject.ExecuteNonQuery(string.Format(CreateJunkTable, this._tableUid))
             .Wait();
         testSubject.ExecuteScalar<int>(string.Format(CountJunkTables, this._tableUid))
             .Result.Should().Be(1);
     }
 }
 private void NumJunkTablesShouldBe(SqlServerTranection testSubject, int expected)
 {
     testSubject.ExecuteScalar<int>(string.Format(CountJunkTables, this._tableUid))
         .Result.Should().Be(expected);
 }
 public void SqlTrannectionShouldExecuteSqlOnItsTarget()
 {
     using (var testSubject = new SqlServerTranection(LocalMasterDb))
     {
         testSubject.ExecuteScalar<int>("select count(*) from sys.objects;").Result.Should().BeGreaterThan(10);
     }
 }