public void InvalidNamedConnectedStringThrows()
		{
			Dictionary<string, string> settings = new Dictionary<string, string>();
			settings.Add(Environment.ConnectionStringName, "MyConStr");
			ConnectionProvider cp = new MockConnectionProvider();
			Assert.Throws<HibernateException>(()=>cp.Configure(settings), "Could not find named connection string MyConStr");
		}
		public void CanGetNamedConnectionStringFromConfiguration()
		{
			Dictionary<string, string> settings = new Dictionary<string, string>();
			settings.Add(Environment.ConnectionStringName, "DummyConnectionString");
			MockConnectionProvider cp = new MockConnectionProvider();
			cp.Configure(settings);

			Assert.AreEqual("TestConnectionString-TestConnectionString", cp.PublicConnectionString);
		}
        public void InvalidNamedConnectedStringThrows()
        {
            Dictionary <string, string> settings = new Dictionary <string, string>();

            settings.Add(Environment.ConnectionStringName, "MyConStr");
            ConnectionProvider cp = new MockConnectionProvider();

            Assert.Throws <HibernateException>(() => cp.Configure(settings), "Could not find named connection string MyConStr");
        }
		public void ConnectionStringInSettingsOverrideNamedConnectionSTring()
		{
			Dictionary<string, string> settings = new Dictionary<string, string>();
			string conStr = "Test Connection String";
			settings.Add(Environment.ConnectionString, conStr);
			settings.Add(Environment.ConnectionStringName, "MyConStr");
			MockConnectionProvider cp = new MockConnectionProvider();
			cp.Configure(settings);

			Assert.AreEqual(conStr, cp.PublicConnectionString);
		}
        public void CanGetNamedConnectionStringFromConfiguration()
        {
            Dictionary <string, string> settings = new Dictionary <string, string>();

            settings.Add(Environment.ConnectionStringName, "DummyConnectionString");
            MockConnectionProvider cp = new MockConnectionProvider();

            cp.Configure(settings);

            Assert.AreEqual("TestConnectionString-TestConnectionString", cp.PublicConnectionString);
        }
        public void ConnectionStringInSettingsOverrideNamedConnectionSTring()
        {
            Dictionary <string, string> settings = new Dictionary <string, string>();
            string conStr = "Test Connection String";

            settings.Add(Environment.ConnectionString, conStr);
            settings.Add(Environment.ConnectionStringName, "MyConStr");
            MockConnectionProvider cp = new MockConnectionProvider();

            cp.Configure(settings);

            Assert.AreEqual(conStr, cp.PublicConnectionString);
        }
        public void CanGetNamedConnectionStringFromConfiguration()
        {
            Assume.That(TestsContext.ExecutingWithVsTest, Is.False);

            Dictionary <string, string> settings = new Dictionary <string, string>();

            settings.Add(Environment.ConnectionStringName, "DummyConnectionString");
            MockConnectionProvider cp = new MockConnectionProvider();

            cp.Configure(settings);

            Assert.AreEqual("TestConnectionString-TestConnectionString", cp.PublicConnectionString);
        }