public void ThrowExceptionOnMySqlConnectionAverageAllWithHints() { // Setup var tables = Database.CreateCompleteTables(10); using (var connection = new MySqlConnection(Database.ConnectionString)) { // Act connection.AverageAll <CompleteTable>(e => e.ColumnInt, hints: "WhatEver"); } }
public void ThrowExceptionOnMySqlConnectionAverageAllViaTableNameWithHints() { // Setup var tables = Database.CreateCompleteTables(10); using (var connection = new MySqlConnection(Database.ConnectionString)) { // Act connection.AverageAll(ClassMappedNameCache.Get <CompleteTable>(), Field.Parse <CompleteTable>(e => e.ColumnInt), hints: "WhatEver"); } }
public void TestMySqlConnectionAverageAll() { // Setup var tables = Database.CreateCompleteTables(10); using (var connection = new MySqlConnection(Database.ConnectionString)) { // Act var result = connection.AverageAll <CompleteTable>(e => e.ColumnInt); // Assert Assert.AreEqual(tables.Average(e => e.ColumnInt), Convert.ToDouble(result)); } }
public void TestMySqlConnectionAverageAllViaTableName() { // Setup var tables = Database.CreateCompleteTables(10); using (var connection = new MySqlConnection(Database.ConnectionString)) { // Act var result = connection.AverageAll(ClassMappedNameCache.Get <CompleteTable>(), Field.Parse <CompleteTable>(e => e.ColumnInt)); // Assert Assert.AreEqual(tables.Average(e => e.ColumnInt), Convert.ToDouble(result)); } }