Beispiel #1
0
        public void CreateUserSpellingListDirectory_TestArgumentPathToLongException()
        {
            // Assign
            const string DirPath = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +
                                   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +
                                   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +
                                   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +
                                   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +
                                   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +
                                   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +
                                   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +
                                   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +
                                   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +
                                   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +
                                   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +
                                   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +
                                   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +
                                   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +
                                   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +
                                   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +
                                   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +
                                   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +
                                   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +
                                   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +
                                   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";

            SpellingPropertiesClass.UserName = "******";

            // Act
            var retVal = DirectoryFileOperationsClass.CreateUserSpellingListDirectory(DirPath);

            // Assert
            Assert.IsFalse(retVal);
        }
Beispiel #2
0
        public void CreateUserSpellingListDirectory_TestInvalidCharactersInPathString()
        {
            // Assign
            const string DirPath = @"c:\Are<Done >";

            // Act
            var retVal = DirectoryFileOperationsClass.CreateUserSpellingListDirectory(DirPath);

            // Assert

            Assert.IsFalse(retVal);
        }
Beispiel #3
0
        public void CreateUserSpellingListDirectory_TestArgumentDirectoryNotFoundException()
        {
            // Assign
            var dirPath = string.Empty;

            SpellingPropertiesClass.UserName = string.Empty;

            // Act
            var retVal = DirectoryFileOperationsClass.CreateUserSpellingListDirectory(dirPath);

            // Assert
            Assert.IsFalse(retVal);
        }
Beispiel #4
0
        public void CreateUserSpellingListDirectory_TestArgumentNullException()
        {
            // Assign
            const string DirPath = null;

            var dirName = SpellingPropertiesClass.GetArt2MSpellDirectoryName;

            SpellingPropertiesClass.UserName = "******";

            // Act
            var retVal = DirectoryFileOperationsClass.CreateUserSpellingListDirectory(DirPath);

            // Assert
            Assert.IsFalse(retVal);
        }
Beispiel #5
0
        public void CreateUserSpellingListDirectory_TestDirectoryExistsOrIsCreated()
        {
            // Assign
            SpellingPropertiesClass.AppDataDirectoryPath =
                Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);

            var dirName = SpellingPropertiesClass.GetArt2MSpellDirectoryName;

            SpellingPropertiesClass.UserName = "******";

            // Act

            var retVal = DirectoryFileOperationsClass.CreateUserSpellingListDirectory(
                SpellingPropertiesClass.AppDataDirectoryPath);

            // Assert
            Assert.IsTrue(retVal);
        }