public void SettingRepository_GetAllSettings_CheckIfDBContainTwoSetting() { //arrange var settingRepository = new SettingsRepository(_datacontext); //act var result = settingRepository.GetAllSettings().ToList().Count; //assert Assert.AreEqual(2, result); }
public void SettingRepository_GetAllSettings_CheckIfDBContainTwoNotZerroSettings(string name) { //arrange var settingRepository = new SettingsRepository(_datacontext); //act var result = settingRepository.GetAllSettings().ToList().FirstOrDefault(s => s.SettingName == name); //assert Assert.Greater(Convert.ToInt32(result.SettingValue), 0); }