Exemple #1
0
        /// <summary>
        /// Verify all of the objects in the database and registry.
        /// </summary>
        /// <param name="schema">The schema to verify.</param>
        /// <param name="connection">The connection to use.</param>
        private static void VerifyObjectsAndRegistry(IEnumerable <string> schema, RecordingDbConnection connection)
        {
            connection.DoNotLog(() =>
            {
                // make sure the schema registry was updated
                SchemaRegistry registry = new SchemaRegistry(connection, TestSchemaGroup);

                // make sure all of the objects exist in the database
                foreach (var schemaObject in schema.Select(s => new SchemaObject(s)))
                {
                    // azure doesn't support xml index, so lets comment those out
                    if (schemaObject.Sql.Contains("XML INDEX") && connection.IsAzure())
                    {
                        continue;
                    }

                    Assert.True(schemaObject.Exists(connection), "Object {0} is missing from database", schemaObject.Name);
                    Assert.True(registry.Contains(schemaObject), "Object {0} is missing from registry", schemaObject.Name);
                }
            });
        }
		/// <summary>
		/// Verify all of the objects in the database and registry.
		/// </summary>
		/// <param name="schema">The schema to verify.</param>
		/// <param name="connection">The connection to use.</param>
		private static void VerifyObjectsAndRegistry(IEnumerable<string> schema, RecordingDbConnection connection)
		{
			connection.DoNotLog(() =>
			{
				// make sure the schema registry was updated
				SchemaRegistry registry = new SchemaRegistry(connection, TestSchemaGroup);

				// make sure all of the objects exist in the database
				foreach (var schemaObject in schema.Select(s => new SchemaObject(s)))
				{
					// azure doesn't support xml index, so lets comment those out
					if (schemaObject.Sql.Contains("XML INDEX") && connection.IsAzure())
						continue;

					Assert.True(schemaObject.Exists(connection), "Object {0} is missing from database", schemaObject.Name);
					Assert.True(registry.Contains(schemaObject), "Object {0} is missing from registry", schemaObject.Name);
				}
			});
		}