예제 #1
0
        public void WithoutLazyInitializationAndCulture_CacheWithCulture()
        {
            var recognizer    = new SequenceRecognizer(Culture.English, lazyInitialization: false);
            var internalCache = recognizer.GetInternalCache();

            Assert.IsTrue(internalCache.All(kv => kv.Key.culture == Culture.English));
        }
예제 #2
0
        public void WithLazyInitialization_CacheEmpty()
        {
            var recognizer    = new SequenceRecognizer(lazyInitialization: true);
            var internalCache = recognizer.GetInternalCache();

            Assert.AreEqual(0, internalCache.Count);
        }
예제 #3
0
        public void WithoutLazyInitialization_CacheFull()
        {
            var recognizer    = new SequenceRecognizer(lazyInitialization: false);
            var internalCache = recognizer.GetInternalCache();

            Assert.AreNotEqual(0, internalCache.Count);
        }
예제 #4
0
        public void Initialization()
        {
            var recognizer = new SequenceRecognizer();

            recognizer.GetInternalCache().Clear();
        }