Пример #1
0
        /// <summary>
        /// Periodizes a timeseries
        /// </summary>
        /// <param name="id">a tab-separated list of times and values</param>
        /// <returns></returns>
        /// <remarks>It seems that the parameter must be named id for this
        /// method to be hit. Otherwise the parameterless Get is called.</remarks>
        public string Get(string id)
        {
            //var id = 12345;
            var ts         = TsParser.ParseTimeseries(id);     // Problem: A tab in the request is not accepted by the browser
            var periodizer = new Periodizer();

            return(periodizer.InsertPoints(ts, Interval.Year).ToString());
            //return $"the value of {id} is {id * id}";
        }
Пример #2
0
 public void InsertPoints_WhenNullThrowsArgumentException()
 {
     Assert.Throws <ArgumentException>(() => m_Periodizer.InsertPoints(null, Interval.Year));
 }