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

                // Act
                connection.BatchQueryAsync <SdsCompleteTable>(0,
                                                              3,
                                                              OrderField.Ascending <SdsCompleteTable>(c => c.Id).AsEnumerable(),
                                                              (object)null,
                                                              hints: "WhatEver").Wait();
            }
        }
Exemplo n.º 2
0
        public void ThrowExceptionOnSqLiteConnectionBatchQueryAsyncViaTableNameWithHints()
        {
            using (var connection = new SQLiteConnection(Database.ConnectionString))
            {
                // Setup
                var tables = Database.CreateCompleteTables(10, connection);

                // Act
                connection.BatchQueryAsync(ClassMappedNameCache.Get <CompleteTable>(),
                                           0,
                                           3,
                                           OrderField.Ascending <CompleteTable>(c => c.Id).AsEnumerable(),
                                           (object)null,
                                           hints: "WhatEver").Wait();
            }
        }
Exemplo n.º 3
0
        public void TestSqLiteConnectionBatchQueryAsyncThirdBatchDescending()
        {
            using (var connection = new SQLiteConnection(Database.ConnectionStringSDS))
            {
                // Setup
                var tables = Database.CreateSdsCompleteTables(10, connection);

                // Act
                var result = connection.BatchQueryAsync <SdsCompleteTable>(2,
                                                                           3,
                                                                           OrderField.Descending <SdsCompleteTable>(c => c.Id).AsEnumerable(),
                                                                           (object)null).Result;

                // Assert
                Helper.AssertPropertiesEquality(tables.ElementAt(3), result.ElementAt(0));
                Helper.AssertPropertiesEquality(tables.ElementAt(1), result.ElementAt(2));
            }
        }
Exemplo n.º 4
0
        public void TestSqLiteConnectionBatchQueryViaTableNameAsyncThirdBatchAscending()
        {
            using (var connection = new SQLiteConnection(Database.ConnectionStringSDS))
            {
                // Setup
                var tables = Database.CreateSdsCompleteTables(10, connection);

                // Act
                var result = connection.BatchQueryAsync(ClassMappedNameCache.Get <SdsCompleteTable>(),
                                                        2,
                                                        3,
                                                        OrderField.Ascending <SdsCompleteTable>(c => c.Id).AsEnumerable(),
                                                        (object)null).Result;

                // Assert
                Helper.AssertMembersEquality(tables.ElementAt(6), result.ElementAt(0));
                Helper.AssertMembersEquality(tables.ElementAt(8), result.ElementAt(2));
            }
        }