示例#1
0
        public static void Format_ThrowsFormatException()
        {
            IFormatProvider fp = new CustomerFormatProvider();

            Assert.Throws <FormatException>(() => string.Format(fp, "{0:w}", customer));
        }
示例#2
0
        public static string Format_PositiveTest(Customer customer, string format)
        {
            IFormatProvider fp = new CustomerFormatProvider();

            return(string.Format(fp, format, customer));
        }