public void DirectoryMapItemGetRemotePathCorrectlyThrowsOnInvalidProvider()
        {
            var item = new ArchivialLibrary.Folders.DirectoryMapItem();

            item.ID        = Guid.NewGuid();
            item.LocalPath = "c:\\bin\\programs";
            item.GetRemoteContainerName((ArchivialLibrary.StorageProviders.StorageProviderTypes.Azure) - 1);
        }
        public void DirectoryMapItemGetRemotePathReturnsValidPathForAzureBetween3And63Chars()
        {
            var item = new ArchivialLibrary.Folders.DirectoryMapItem();

            item.ID        = Guid.NewGuid();
            item.LocalPath = "c:\\bin\\programs";

            var path = item.GetRemoteContainerName(ArchivialLibrary.StorageProviders.StorageProviderTypes.Azure);

            Assert.IsNotNull(path);

            Assert.IsTrue(path.Length >= 3);
            Assert.IsTrue(path.Length <= 63);
        }
        public void DirectoryMapItemGetRemotePathReturnsValidPathForAzureStartsWithOnlyLetterOrNumber()
        {
            var item = new ArchivialLibrary.Folders.DirectoryMapItem();

            item.ID        = Guid.NewGuid();
            item.LocalPath = "c:\\bin\\programs";

            var path = item.GetRemoteContainerName(ArchivialLibrary.StorageProviders.StorageProviderTypes.Azure);

            Assert.IsNotNull(path);
            Assert.IsTrue(path.Length > 0);

            if (!char.IsLetterOrDigit(path[0]))
            {
                Assert.Fail("Expected only letters, digits for the first character.");
            }
        }
        public void DirectoryMapItemGetRemotePathReturnsValidPathForAzureOnlyLettersNumbersAndDashes()
        {
            var item = new ArchivialLibrary.Folders.DirectoryMapItem();

            item.ID        = Guid.NewGuid();
            item.LocalPath = "c:\\bin\\programs";

            var path = item.GetRemoteContainerName(ArchivialLibrary.StorageProviders.StorageProviderTypes.Azure);

            Assert.IsNotNull(path);

            for (int i = 0; i < path.Length; i++)
            {
                if (!char.IsLetter(path[i]) && !char.IsDigit(path[i]) && path[i] != '-')
                {
                    Assert.Fail("Expected only letters, digits, or dashes.");
                }
            }
        }
        public void DirectoryMapItemGetRemotePathReturnsValidPathForAzureLowerCase()
        {
            var item = new ArchivialLibrary.Folders.DirectoryMapItem();

            item.ID        = Guid.NewGuid();
            item.LocalPath = "C:\\Bin\\Programs";

            var path = item.GetRemoteContainerName(ArchivialLibrary.StorageProviders.StorageProviderTypes.Azure);

            Assert.IsNotNull(path);

            for (int i = 0; i < path.Length; i++)
            {
                if (char.IsLetter(path[i]) && !char.IsLower(path[i]))
                {
                    Assert.Fail("Expected all lowercase letters.");
                }
            }
        }