Esempio n. 1
0
        public void AddSettingToRule_ShouldAddRightSettingToRightRule()
        {
            var dataStore = RCTestUtils.GetDataStore();

            dataStore.rulesList = new List <RuleWithSettingsMetadata>(RCTestUtils.rulesWithSettingsMetadata);
            dataStore.rsKeyList = new List <RsKvtData>(RCTestUtils.rsListWithMetadata);
            RemoteConfigDataManager dataManager = new RemoteConfigDataManager();

            dataManager.AddSettingToRule(RCTestUtils.ruleOneId, RCTestUtils.stringKeyName);
            Assert.That(dataStore.rulesList.Find(r => r.id == RCTestUtils.ruleOneId).value.Contains(RCTestUtils.rsListWithMetadata[0]));
            Assert.That(dataStore.updatedRulesIDs.Contains(RCTestUtils.ruleOneId));
        }