public void InvalidCoerceThrows()
        {
            var opt = new OptAttribute("testName");

            var ex = Assert.Throws<Exception>(() => opt.Coerce("12xs", typeof (TimeSpan)));
            Assert.IsNotNull(ex);
            Assert.IsNotNull(ex.Message);
            Assert.IsTrue(ex.Message.Contains(opt.Name));
        }
 public void Coerce()
 {
     var opt = new OptAttribute("testName");
     var coercedVal = opt.Coerce("12ms", typeof(TimeSpan));
     Assert.AreEqual(TimeSpan.FromMilliseconds(12), coercedVal);
 }