Esempio n. 1
0
        public async Task InitializeStoreVerifyTablesExistTest()
        {
            await InstanceStore.InitializeStoreAsync(false);

            using (var connection = GetConnection())
                using (var command = connection.CreateCommand())
                {
                    command.CommandText = $"SELECT OBJECT_ID('{Settings.OrchestrationStateTableName}'), OBJECT_ID('{Settings.WorkItemTableName}')";

                    await connection.OpenAsync();

                    var reader = await command.ExecuteReaderAsync();

                    if (await reader.ReadAsync())
                    {
                        Assert.AreNotEqual(DBNull.Value, reader.GetValue(0), "No Orchestration table found.");
                        Assert.AreNotEqual(DBNull.Value, reader.GetValue(1), "No Work Item table found.");
                        return;
                    }
                }

            Assert.Fail("No rows returned by query.");
        }
Esempio n. 2
0
        public async Task InitializeStoreIdempotenceTest()
        {
            await InstanceStore.InitializeStoreAsync(true);

            await InstanceStore.InitializeStoreAsync(false);
        }