Ejemplo n.º 1
0
        public void DeleteRule_ShouldDeleteNewlyAddedRuleFromRulesListWithoutAddingItToDeletedRuleIDs()
        {
            var dataStore   = RCTestUtils.GetDataStore();
            var deletedRule = RCTestUtils.rulesWithSettingsMetadata[0];
            RemoteConfigDataManager dataManager = new RemoteConfigDataManager();

            dataManager.UpdateRule(deletedRule);
            dataManager.DeleteRule(deletedRule.id);

            Assert.That(!dataStore.rulesList.Contains(deletedRule));
            Assert.That(!dataStore.deletedRulesIDs.Contains(deletedRule.id));
            Assert.That(!dataStore.rulesList.Contains(deletedRule));
        }
Ejemplo n.º 2
0
        public void DeleteRule_DeletesRuleFromRulesListAndAddsRuleToDeletedRuleIDs()
        {
            var dataStore = RCTestUtils.GetDataStore();

            dataStore.rulesList = new List <RuleWithSettingsMetadata>(RCTestUtils.rulesWithSettingsMetadata);
            var deletedRule = RCTestUtils.rulesWithSettingsMetadata[0];
            RemoteConfigDataManager dataManager = new RemoteConfigDataManager();

            dataManager.DeleteRule(deletedRule.id);

            Assert.That(!dataStore.rulesList.Contains(deletedRule));
            Assert.That(dataStore.deletedRulesIDs.Contains(deletedRule.id));
            Assert.That(!dataStore.rulesList.Contains(deletedRule));
        }