Beispiel #1
0
        public void SettingRepository_GetAllSettings_CheckIfDBContainTwoSetting()
        {
            //arrange
            var settingRepository = new SettingsRepository(_datacontext);

            //act
            var result = settingRepository.GetAllSettings().ToList().Count;

            //assert
            Assert.AreEqual(2, result);
        }
Beispiel #2
0
        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);
        }