Exemple #1
0
        public Dictionary <string, double> GetCurrencyValues(string league)
        {
            FetchCurrencyValues fetchCurrencyValues = new FetchCurrencyValues {
                League = league
            };
            FetchEssenceValues fetchEssenceValues = new FetchEssenceValues {
                League = league
            };
            FetchFossilValues fetchFossilValues = new FetchFossilValues {
                League = league
            };
            FetchResonatorValues fetchResonatorValues = new FetchResonatorValues {
                League = league
            };

            var currency   = fetchCurrencyValues.Execute();
            var essences   = fetchEssenceValues.Execute();
            var fossils    = fetchFossilValues.Execute();
            var resonators = fetchResonatorValues.Execute();

            return(currency
                   .Union(essences)
                   .Union(fossils)
                   .Union(resonators)
                   .ToDictionary(x => x.Key, x => x.Value));
        }
Exemple #2
0
        public void FetchResonatorValuesTest()
        {
            IFetchCurrencyValues currencyValues = new FetchCurrencyValues();

            currencyValues.League = defaultLeague;
            var data = currencyValues.Execute();

            Assert.IsNotNull(data);
            Assert.IsTrue(data.Count > 1);
            Assert.IsTrue(data.Keys.All(x => !string.IsNullOrEmpty(x)));
            Assert.IsTrue(data.Values.All(x => x != 0));
        }