Esempio n. 1
0
        public void ThrowExceptionOnSqLiteConnectionAverageAllAsyncWithHints()
        {
            using (var connection = new SQLiteConnection(Database.ConnectionString))
            {
                // Setup
                var tables = Database.CreateCompleteTables(10, connection);

                // Act
                connection.AverageAllAsync <CompleteTable>(e => e.ColumnInt,
                                                           hints: "WhatEver").Wait();
            }
        }
Esempio n. 2
0
        public void ThrowExceptionOnSqLiteConnectionAverageAllAsyncViaTableNameWithHints()
        {
            using (var connection = new SQLiteConnection(Database.ConnectionString))
            {
                // Setup
                var tables = Database.CreateCompleteTables(10, connection);

                // Act
                connection.AverageAllAsync(ClassMappedNameCache.Get <CompleteTable>(),
                                           Field.Parse <CompleteTable>(e => e.ColumnInt).First(),
                                           hints: "WhatEver").Wait();
            }
        }
Esempio n. 3
0
        public void TestSqLiteConnectionAverageAllAsync()
        {
            using (var connection = new SQLiteConnection(Database.ConnectionString))
            {
                // Setup
                var tables = Database.CreateCompleteTables(10, connection);

                // Act
                var result = connection.AverageAllAsync <CompleteTable>(e => e.ColumnInt).Result;

                // Assert
                Assert.AreEqual(tables.Average(e => e.ColumnInt), result);
            }
        }
Esempio n. 4
0
        public void TestSqLiteConnectionAverageAllAsyncViaTableName()
        {
            using (var connection = new SQLiteConnection(Database.ConnectionString))
            {
                // Setup
                var tables = Database.CreateCompleteTables(10, connection);

                // Act
                var result = connection.AverageAllAsync(ClassMappedNameCache.Get <CompleteTable>(),
                                                        Field.Parse <CompleteTable>(e => e.ColumnInt).First()).Result;

                // Assert
                Assert.AreEqual(tables.Average(e => e.ColumnInt), result);
            }
        }