public void ThrowExceptionOnPostgreSqlConnectionAverageAllAsyncWithHints() { // Setup var tables = Database.CreateCompleteTables(10); using (var connection = new NpgsqlConnection(Database.ConnectionString)) { // Act connection.AverageAllAsync <CompleteTable>(e => e.ColumnInteger, hints: "WhatEver").Wait(); } }
public void ThrowExceptionOnPostgreSqlConnectionAverageAllAsyncViaTableNameWithHints() { // Setup var tables = Database.CreateCompleteTables(10); using (var connection = new NpgsqlConnection(Database.ConnectionString)) { // Act connection.AverageAllAsync(ClassMappedNameCache.Get <CompleteTable>(), Field.Parse <CompleteTable>(e => e.ColumnInteger), hints: "WhatEver").Wait(); } }
public void TestPostgreSqlConnectionAverageAllAsync() { // Setup var tables = Database.CreateCompleteTables(10); using (var connection = new NpgsqlConnection(Database.ConnectionString)) { // Act var result = connection.AverageAllAsync <CompleteTable>(e => e.ColumnInteger).Result; // Assert Assert.AreEqual(tables.Average(e => e.ColumnInteger), Convert.ToDouble(result)); } }
public void TestPostgreSqlConnectionAverageAllAsyncViaTableName() { // Setup var tables = Database.CreateCompleteTables(10); using (var connection = new NpgsqlConnection(Database.ConnectionString)) { // Act var result = connection.AverageAllAsync(ClassMappedNameCache.Get <CompleteTable>(), Field.Parse <CompleteTable>(e => e.ColumnInteger)).Result; // Assert Assert.AreEqual(tables.Average(e => e.ColumnInteger), Convert.ToDouble(result)); } }