예제 #1
0
        public void ResolverFindsMultipleDigitValues()
        {
            var backend = new NumberResolver
            {
                Rules = new Rules("NumberResolverTests")
            };

            var dictionary = backend.Search("0019928837465");

            Assert.IsTrue(dictionary.Any(o => o.Number == "0019928837465"));
            Assert.IsTrue(dictionary.Where(o=> o.Number=="0019928837465").Any(o => o.Words.Contains("zsdpbnwfmkrjl")));
        }
예제 #2
0
        public void ResolverFindsSingleDigitValues()
        {
            var backend = new NumberResolver
            {
                Rules = new Rules("NumberResolverTests")
            };

            var dictionary = backend.Search("0123456789");

            for (int i = 0; i < 10; i++)
            {
                Assert.IsTrue(dictionary.Any(o => o.Number == i.ToString()));
            }
        }
예제 #3
0
 public void WhenNumberResolverIsCreatedWordsAreNotNull()
 {
     var backend = new NumberResolver();
     Assert.IsNotNull(backend.Words);
 }