public void DoubleFTest(double?expected, string expr, string remain) { if (expected == null) { Assert.Throws <FormatException>(() => ParseHelper.DoubleF(null, ref expr)); } else { Assert.Equal(expected, ParseHelper.DoubleF(null, ref expr)); } Assert.Equal(remain, expr); }