Exemplo n.º 1
0
        public void ParseRangeToListOfDouble_With_Negative_Numbers_Throws_ArgumentException()
        {
            var ex = Assert.Throws <ArgumentException>(() =>
            {
                ListLibrary.ParseRangeToListOfDouble("-4-11");
            });

            Assert.That(ex.Message, Is.EqualTo("Negative values are not supported."));
        }
Exemplo n.º 2
0
        public string ParseRangeToListOfDouble(string rangeString)
        {
            IEnumerable <double> listFromRange = ListLibrary.ParseRangeToListOfDouble(rangeString);

            string output = "";

            foreach (double item in listFromRange)
            {
                output += item + ", ";
            }
            output = output.Trim();
            return(output);
        }