public void CopyTo_ArrayIndexIsNegative_ExceptionThrown()
        {
            var collection = new StandardWordListCollection();

            StandardWordList[] array = new StandardWordList[1];
            collection.CopyTo(array, -1);
        }
 public static string Retrieve(StandardWordList standardWordList)
 {
   var resourceManager = WordLists.ResourceManager;
   var resourceName = standardWordList.ToString();
   var result = resourceManager.GetString(resourceName);
   result = result.Replace("\r\n", "\n");
   return result;
 }
        public void CopyTo_DestinationOverflow_ExceptionThrown()
        {
            var collection = new StandardWordListCollection();

            collection.Add(StandardWordList.FemaleNames);
            collection.Add(StandardWordList.MaleNames);
            StandardWordList[] array = new StandardWordList[1];
            collection.CopyTo(array, 0);
        }
        public static string Retrieve(StandardWordList standardWordList)
        {
            var resourceManager = WordLists.ResourceManager;
            var resourceName    = standardWordList.ToString();
            var result          = resourceManager.GetString(resourceName);

            result = result.Replace("\r\n", "\n");
            return(result);
        }
        public void CopyTo_AllWordsConfigFile_CopysValuesToSuppliedArray()
        {
            var config = GetAllWordsPasswordValidationSection();

            StandardWordList[] destination = new StandardWordList[config.StandardWordLists.Count];
            config.StandardWordLists.CopyTo(destination, 0);
            int i = 0;

            foreach (var item in config.StandardWordLists)
            {
                var element = (StandardWordListItem)item;
                Assert.AreEqual(element.Value, destination[i], "i = " + i);
                i++;
            }
        }
 public void CopyTo_DestinationOverflow_ExceptionThrown()
 {
   var collection = new StandardWordListCollection();
   collection.Add(StandardWordList.FemaleNames);
   collection.Add(StandardWordList.MaleNames);
   StandardWordList[] array = new StandardWordList[1];
   collection.CopyTo(array, 0);
 }
 public void CopyTo_ArrayIndexIsNegative_ExceptionThrown()
 {
   var collection = new StandardWordListCollection();
   StandardWordList[] array = new StandardWordList[1];
   collection.CopyTo(array, -1);
 }
 public void CopyTo_AllWordsConfigFile_CopysValuesToSuppliedArray()
 {
   var config = GetAllWordsPasswordValidationSection();
   StandardWordList[] destination = new StandardWordList[config.StandardWordLists.Count];
   config.StandardWordLists.CopyTo(destination, 0);
   int i = 0;
   foreach (var item in config.StandardWordLists)
   {
     var element = (StandardWordListItem) item;
     Assert.AreEqual(element.Value, destination[i], "i = " + i);
     i++;
   }
 }