示例#1
0
        public void Table_ExtractConnectionString_AppSettingsTableConnectionStringIsNull_ThrowsArgumentException()
        {
            AzureTableBroker            broker      = new AzureTableBroker();
            Dictionary <string, string> appSettings = new Dictionary <string, string>();

            appSettings.Add("ResourceBrokerTableConnectionString", null);
            this.ExpectException <InvalidOperationException>(() => broker.ExtractConnectionString(appSettings));
        }
示例#2
0
        public void Table_ExtractConnectionString_WithQueueConnectionString_ThrowsException()
        {
            // Setup
            AzureTableBroker            broker      = new AzureTableBroker();
            Dictionary <string, string> appSettings = new Dictionary <string, string>();

            appSettings.Add("ResourceBrokerQueueConnectionString", ConnectionString);

            // Act
            this.ExpectException <InvalidOperationException>(() => broker.ExtractConnectionString(appSettings));
        }
示例#3
0
        public void Table_ExtractConnectionString_AppSettingsTableConnectionString_ReturnsTableConnectionString()
        {
            // Setup
            AzureTableBroker            broker      = new AzureTableBroker();
            Dictionary <string, string> appSettings = new Dictionary <string, string>();

            appSettings.Add("ResourceBrokerTableConnectionString", ConnectionString);

            // Act
            string c = broker.ExtractConnectionString(appSettings);

            // Assert
            Assert.AreEqual(c, ConnectionString);
        }