public void ThrowExceptionOnPostgreSqlConnectionCountAllAsyncWithHints() { // Setup var tables = Database.CreateCompleteTables(10); using (var connection = new NpgsqlConnection(Database.ConnectionString)) { // Act connection.CountAllAsync <CompleteTable>(hints: "WhatEver").Wait(); } }
public void TestSqlTransactionForCountAllAsync() { using (var connection = new NpgsqlConnection(Database.ConnectionString)) { // Prepare using (var transaction = connection.EnsureOpen().BeginTransaction()) { // Act connection.CountAllAsync <CompleteTable>(transaction: transaction).Wait(); } } }
public void ThrowExceptionOnPostgreSqlConnectionCountAllAsyncViaTableNameWithHints() { // Setup var tables = Database.CreateCompleteTables(10); using (var connection = new NpgsqlConnection(Database.ConnectionString)) { // Act connection.CountAllAsync(ClassMappedNameCache.Get <CompleteTable>(), hints: "WhatEver").Wait(); } }
public void TestPostgreSqlConnectionCountAllAsync() { // Setup var tables = Database.CreateCompleteTables(10); using (var connection = new NpgsqlConnection(Database.ConnectionString)) { // Act var result = connection.CountAllAsync <CompleteTable>().Result; // Assert Assert.AreEqual(tables.Count(), result); } }