public void CreateAzureTableWithInvalidNameTest() { string[] invalidTableNames = { string.Empty, "a", "&*(", }; foreach (string invalidTableName in invalidTableNames) { // v1 test AssertThrows <ArgumentException>(() => command.CreateAzureTable(invalidTableName), String.Format(Resources.InvalidTableName, invalidTableName)); // v2 test AssertThrows <ArgumentException>(() => command.CreateAzureTableV2(this.tableMock, invalidTableName), String.Format(Resources.InvalidTableName, invalidTableName)); } }
public void CreateAzureTableWithInvalidNameTest() { string name = String.Empty; AssertThrows <ArgumentException>(() => command.CreateAzureTable(name), String.Format(Resources.InvalidTableName, name)); name = "a"; AssertThrows <ArgumentException>(() => command.CreateAzureTable(name), String.Format(Resources.InvalidTableName, name)); name = "&*("; AssertThrows <ArgumentException>(() => command.CreateAzureTable(name), String.Format(Resources.InvalidTableName, name)); }