Пример #1
0
        public void SetRulesDataStore_SetsCorrectEntityIdOnSettingsInRule()
        {
            var dataStore = RCTestUtils.GetDataStore();
            RemoteConfigDataManager dataManager = new RemoteConfigDataManager();
            var config = new RemoteConfigConfigData()
            {
                type  = "settings",
                id    = "someId",
                value = RCTestUtils.rsListWihtoutMetadata
            };

            dataManager.SetRSDataStore(config);
            dataManager.SetRulesDataStore(RCTestUtils.rulesList);

            Assert.That(RuleListsAreEqual(dataStore.rulesList, RCTestUtils.rulesList));
            var rulesFromDataStore    = dataStore.rulesList;
            var settingsFromDataStore = dataStore.rsKeyList;

            for (int i = 0; i < rulesFromDataStore.Count; i++)
            {
                for (int j = 0; j < rulesFromDataStore[i].value.Count; i++)
                {
                    Assert.That(settingsFromDataStore.Contains(rulesFromDataStore[i].value[j]));
                }
            }
        }
Пример #2
0
        public void SetRSDataStore_SetsRSDataStoreWhenAListIsPassedIn()
        {
            var dataStore = RCTestUtils.GetDataStore();
            RemoteConfigDataManager dataManager = new RemoteConfigDataManager();
            var config = new RemoteConfigConfigData()
            {
                type  = "settings",
                id    = "someId",
                value = RCTestUtils.rsListWihtoutMetadata
            };

            dataManager.SetRSDataStore(config);

            Assert.That(RSListsAreEqual(dataStore.rsKeyList, RCTestUtils.rsListWihtoutMetadata));
        }