Beispiel #1
0
        public void TestDictionaryName()
        {
            var mockDictionaryLoader = new Mock <IDictionaryLoader>();

            mockDictionaryLoader
            .Setup(dl => dl.GetLines())
            .Returns(new string[] { "en-fr" });

            var dictionaryParser = new DictionaryParser(mockDictionaryLoader.Object);

            Assert.Equal("en-fr", dictionaryParser.GetName());
        }
Beispiel #2
0
        public void TestEmptyFileName()
        {
            var mockDictionaryLoader = new Mock <IDictionaryLoader>();

            mockDictionaryLoader
            .Setup(dl => dl.GetLines())
            .Returns(new string[] { });

            var dictionaryParser = new DictionaryParser(mockDictionaryLoader.Object);

            Assert.Equal(string.Empty, dictionaryParser.GetName());
        }