Esempio n. 1
0
        private RangeBucket <Variation> GetVariations(string variationName)
        {
            var result = new RangeBucket <Variation>(10000);

            result.Add(100, new Variation(1, variationName, null, 100, false));
            return(result);
        }
        private RangeBucket <Variation> GetVariations(string variationName = null)
        {
            var result = new RangeBucket <Variation>(10000);

            result.Add(100, GetVariation(variationName));
            return(result);
        }
Esempio n. 3
0
        private RangeBucket <int> GetTestRangeBucket(int maxVal = 100, bool continousRange = true)
        {
            var result = new RangeBucket <int>(maxVal, continousRange);
            List <KeyValuePair <int, int> > weightValuePairs = new List <KeyValuePair <int, int> >()
            {
                new KeyValuePair <int, int>(20, 1),
                new KeyValuePair <int, int>(20, 2),
                new KeyValuePair <int, int>(20, 3),
                new KeyValuePair <int, int>(20, 4),
                new KeyValuePair <int, int>(20, 5),
            };

            foreach (var weightKeyPair in weightValuePairs)
            {
                result.Add(weightKeyPair.Key, weightKeyPair.Value);
            }

            return(result);
        }