Esempio n. 1
0
 public static IEnumerable <T> GetMany <T>(this TestContextHelper <T> helper, string testAttributeName, IFormatProvider formatProvider = null)
 {
     foreach (var kvp in helper.TestContext.GetTestContextPropertiesStartsWith(testAttributeName))
     {
         yield return(TestContextExtensions.Convert <T>(kvp.Value, formatProvider));
     }
 }
Esempio n. 2
0
 public static IEnumerable <T2> GetMany <T1, T2>(this TestContextHelper <T1> helper, Expression <Func <T1, T2> > expression, IFormatProvider formatProvider = null)
 {
     foreach (var kvp in helper.TestContext.GetTestContextPropertiesStartsWith(expression.GetMemberName()))
     {
         yield return(TestContextExtensions.Convert <T2>(kvp.Value, formatProvider));
     }
 }
Esempio n. 3
0
 public static T Get <T>(this TestContextHelper <T> helper, string testAttributeName, IFormatProvider formatProvider = null)
 => TestContextExtensions.Convert <T>(helper.TestContext.Get(testAttributeName), formatProvider);
Esempio n. 4
0
 public static T2 Get <T1, T2>(this TestContextHelper <T1> helper, Expression <Func <T1, T2> > expression, IFormatProvider formatProvider = null)
 => TestContextExtensions.Convert <T2>(helper.TestContext.Get(expression.GetMemberName()), formatProvider);