Exemplo n.º 1
0
        public void Get_All_Equal_Words_From_Torah_Test()
        {
            int sum = 10;
            GemateriaFromTorahCalculator torahFinder = new GemateriaFromTorahCalculator();
            IEnumerable <string>         result      = torahFinder.GetAllGematrios(sum);

            Assert.IsTrue(result.Any());
            foreach (var str in result)
            {
                long total = new GemateriaCalculator().CalculateGemateria(str);
                Assert.AreEqual(sum, (int)total);
            }
        }
Exemplo n.º 2
0
        private void findMatchesInTorahButton_Click(object sender, EventArgs e)
        {
            long sum = gemateriaCalculator.CalculateGemateria(hebrewPhrase);

            numberResultTextBox.Text = sum.ToString();

            GemateriaFromTorahCalculator torahCalculator = new GemateriaFromTorahCalculator();
            var matches = torahCalculator.GetAllGematrios((int)sum).Distinct();

            resultAmountLabel.Text = matches.Count().ToString();
            torahMatchesListBox.Items.Clear();

            foreach (var match in matches)
            {
                torahMatchesListBox.Items.Add(match);
            }
        }