public void CheckWord_Hello_InList_MustReturn_False() { string wordToSearch = "HELLO"; SettingsModel settingsModel = new SettingsModel() { Words = "VITAMIN A;FIBER;MICKEY MOUSE" }; var mockSettings = new Mock <IOptions <SettingsModel> >(); mockSettings.Setup(w => w.Value).Returns(settingsModel); var wordData = new WordData(mockSettings.Object); var result = wordData.ValidateWordInList(wordToSearch); Assert.False(result); }