예제 #1
0
        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));
            }
        }
예제 #2
0
        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));
        }