Example #1
0
        public void CheckWord_Count_Of_Words_MustReturn_AtLeast_3_Words()
        {
            SettingsModel settingsModel = new SettingsModel()
            {
                Words = "VITAMIN A;FIBER;MICKEY MOUSE;MULTIVITAMIN;PHINEAS;FERB"
            };

            var mockSettings = new Mock <IOptions <SettingsModel> >();

            mockSettings.Setup(w => w.Value).Returns(settingsModel);

            var wordData = new WordData(mockSettings.Object);

            var result = wordData.GetRandomWords();

            Assert.NotNull(result);
            Assert.NotEmpty(result);
            Assert.NotEqual(1, result.Count);
            Assert.NotEqual(2, result.Count);
        }