Ejemplo n.º 1
0
        public void RecoverLastWord()
        {
            var          valid = new List <string>();
            const string words = "sword victory much blossom cradle sense boy float soda render arrive";

            foreach (var word in WordLists.GetWords(Languages.English))
            {
                var t = $"{words} {word}";
                if (Mnemonic.IsValid(t))
                {
                    valid.Add(t);
                }
            }
            Assert.Equal(128, valid.Count);
        }
Ejemplo n.º 2
0
 public void WordListsComplete()
 {
     Assert.True(WordLists.GetWords(Languages.English).Length == 2048);
     Assert.True(WordLists.GetWords(Languages.English).First() == "abandon");
     Assert.True(WordLists.GetWords(Languages.Spanish).Length == 2048);
     Assert.True(WordLists.GetWords(Languages.Spanish).First() == "ábaco");
     Assert.True(WordLists.GetWords(Languages.French).Length == 2048);
     Assert.True(WordLists.GetWords(Languages.French).First() == "abaisser");
     Assert.True(WordLists.GetWords(Languages.Italian).Length == 2048);
     Assert.True(WordLists.GetWords(Languages.Italian).First() == "abaco");
     Assert.True(WordLists.GetWords(Languages.Japanese).Length == 2048);
     Assert.True(WordLists.GetWords(Languages.Japanese).First() == "あいこくしん");
     Assert.True(WordLists.GetWords(Languages.PortugueseBrazil).Length == 2048);
     Assert.True(WordLists.GetWords(Languages.PortugueseBrazil).First() == "abacate");
     Assert.True(WordLists.GetWords(Languages.ChineseSimplified).Length == 2048);
     Assert.True(WordLists.GetWords(Languages.ChineseSimplified).First() == "的");
     Assert.True(WordLists.GetWords(Languages.ChineseTraditional).Length == 2048);
     Assert.True(WordLists.GetWords(Languages.ChineseTraditional).First() == "的");
 }