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

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

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

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

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

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

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