Ejemplo n.º 1
0
        public void GetAccountName_ShouldReturn()
        {
            var result = AzureStorageUtils.GetAccountName(AzureStorageAccountConnectionParameters.CreateUsingConnectionString("AccountName=This is the account name;aaa=aa"));

            Assert.Equal("This is the account name", result);
        }
Ejemplo n.º 2
0
        public void GetAccountName_ShouldThrow2()
        {
            var ex = Assert.Throws <ArgumentException>(() => AzureStorageUtils.GetAccountName(AzureStorageAccountConnectionParameters.CreateUsingConnectionString("")));

            Assert.Equal("Neither connection string or account name specified", ex.Message);
        }
Ejemplo n.º 3
0
        public void GetAccountName_ShouldThrow3()
        {
            var ex = Assert.Throws <ArgumentException>(() => AzureStorageUtils.GetAccountName(AzureStorageAccountConnectionParameters.CreateUsingConnectionString("aaaaa")));

            Assert.Equal("Connection string in wrong format", ex.Message);
        }
 public void SetConnectionParameters(string connectionStringConfigName)
 {
     _connectionParameters = AzureStorageAccountConnectionParameters.CreateUsingConnectionString(GetStorageConnectionString(connectionStringConfigName));
 }