/// <summary>
        /// Runs a client test with both Atom and Json OData formats.
        /// </summary>
        /// <typeparam name="TContext">The DataServiceContext type.</typeparam>
        /// <param name="testBase">The test class running the test.</param>
        /// <param name="createContext">A delegate to create the context.</param>
        /// <param name="test">The test action to execute.</param>
        public static void RunOnAtomAndJsonFormats <TContext>(
            this EndToEndTestBase testBase,
            Func <DataServiceContextWrapper <TContext> > createContext,
            Action <DataServiceContextWrapper <TContext> > test) where TContext : DataServiceContext
        {
            var jsonContext = createContext();

            jsonContext.ContextLabel = "Json";
            jsonContext.Format.UseJson();

            testBase.InvokeDataDrivenTest(test, DataDrivenTest.CreateData(jsonContext));
        }
Example #2
0
 /// <summary>
 /// To data driven parameter data
 /// </summary>
 /// <typeparam name="T">The item type</typeparam>
 /// <param name="collection">The item collecion</param>
 /// <returns>The parameter data</returns>
 public static ParameterData<T> ToParamData<T>(this IEnumerable<T> collection)
 {
     return DataDrivenTest.CreateData(collection.ToArray());
 }