Exemplo n.º 1
0
        public void CreateContainerWithInvalidContainerNameTest()
        {
            string name = String.Empty;
            BlobContainerPublicAccessType accesslevel = BlobContainerPublicAccessType.Off;

            AssertThrowsAsync <ArgumentException>(() => command.CreateAzureContainer(InitTaskId, BlobMock, name, accesslevel),
                                                  String.Format(Resources.InvalidContainerName, name));

            name = "a";
            AssertThrowsAsync <ArgumentException>(() => command.CreateAzureContainer(InitTaskId, BlobMock, name, accesslevel),
                                                  String.Format(Resources.InvalidContainerName, name));

            name = "&*(";
            AssertThrowsAsync <ArgumentException>(() => command.CreateAzureContainer(InitTaskId, BlobMock, name, accesslevel),
                                                  String.Format(Resources.InvalidContainerName, name));
        }
Exemplo n.º 2
0
        public void CreateContainerWithInvalidContainerNameTest()
        {
            string name = String.Empty;
            string accesslevel = StorageNouns.ContainerAclOff;

            AssertThrows<ArgumentException>(() => command.CreateAzureContainer(name, accesslevel),
                String.Format(Resources.InvalidContainerName, name));

            name = "a";
            AssertThrows<ArgumentException>(() => command.CreateAzureContainer(name, accesslevel),
                String.Format(Resources.InvalidContainerName, name));

            name = "&*(";
            AssertThrows<ArgumentException>(() => command.CreateAzureContainer(name, accesslevel),
                String.Format(Resources.InvalidContainerName, name));
        }