﻿using System.Configuration;

namespace SchemaZen.test {
	public class ConfigHelper {
		public static string TestDB {
			get { return ConfigurationManager.AppSettings["testdb"]; }
		}

		public static string TestSchemaDir {
			get { return ConfigurationManager.AppSettings["test_schema_dir"]; }
		}

		public static string SqlDbDiffPath {
			get { return ConfigurationManager.AppSettings["SqlDbDiffPath"]; }
		}
	}
}

﻿using System;
using System.Configuration;

namespace SchemaZen.test {
	public class ConfigHelper {
		public static string TestDB {
			get { return GetSetting("testdb"); }
		}

		public static string TestSchemaDir {
			get { return GetSetting("test_schema_dir"); }
		}

		public static string SqlDbDiffPath {
			get { return GetSetting("SqlDbDiffPath"); }
		}

		private static string GetSetting(string key) {
			var val = Environment.GetEnvironmentVariable(key);
			return val ?? ConfigurationManager.AppSettings[key];
		}
	}
}

Read environment variables for test settings.
Read environment variables for test settings.

Allows me to specify a different testdb on the build server.
