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); }
public void GetAccountName_ShouldThrow2() { var ex = Assert.Throws <ArgumentException>(() => AzureStorageUtils.GetAccountName(AzureStorageAccountConnectionParameters.CreateUsingConnectionString(""))); Assert.Equal("Neither connection string or account name specified", ex.Message); }
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)); }