@@ -101,11 +101,21 @@ private static async Task Main(string[] args)
101101 //await IndividualActions.RunTests(pathConfigJson);
102102 //Console.WriteLine("======================");
103103
104+ //Console.ReadLine();
105+
106+ //Console.WriteLine("==========CreateConfigForDatabaseBasedAPIComparrisonCall============");
107+
108+ //CreateConfigForDatabaseBasedAPIComparrisonCall(pathConfigJson, StoreResultsOption.None);
109+
110+ //await IndividualActions.RunTests(pathConfigJson);
111+
112+ //Console.WriteLine("======================");
113+
104114 Console . ReadLine ( ) ;
105115
106116 Console . WriteLine ( "==========CreateConfigForDatabaseBasedAPIComparrisonCall============" ) ;
107117
108- CreateConfigForDatabaseBasedAPIComparrisonCall ( pathConfigJson , StoreResultsOption . None ) ;
118+ CreateConfigForSingleAPICallWithUrlParamAndBodyModel ( pathConfigJson ) ;
109119
110120 await IndividualActions . RunTests ( pathConfigJson ) ;
111121
@@ -126,6 +136,7 @@ private static void CreateConfigForSingleAPICall(string pathConfigJson)
126136 CompareUrlPath = string . Empty ,
127137 UrlPath = "/WeatherForecast" ,
128138 UrlParam = null ,
139+ RequestBody = null ,
129140
130141 HeaderParam = new List < Param > {
131142 new Param ( "accept" , "application/json" )
@@ -157,6 +168,7 @@ private static void CreateConfigForSingleAPICallWithUrlParam(string pathConfigJs
157168 HeaderParam = new List < Param > {
158169 new Param ( "accept" , "application/json" )
159170 } ,
171+ RequestBody = null ,
160172 DBConnectionString = null ,
161173 DBQuery = null ,
162174 DBFields = null ,
@@ -186,6 +198,7 @@ private static void CreateConfigForDatabaseBasedAPICall(string pathConfigJson, S
186198 HeaderParam = new List < Param > {
187199 new Param ( "accept" , "application/json" )
188200 } ,
201+ RequestBody = null ,
189202 DBConnectionString = "Server=127.0.0.1; Database=test; User Id=sa; Password=<YourStrong@Passw0rd>;TrustServerCertificate=True;" ,
190203 DBQuery = "select id as sqlId from dbo.sampleTable;" ,
191204 DBFields = new List < Param >
@@ -217,6 +230,7 @@ private static void CreateConfigForDatabaseBasedAPICallWithFailures(string pathC
217230 HeaderParam = new List < Param > {
218231 new Param ( "accept" , "application/json" )
219232 } ,
233+ RequestBody = null ,
220234 DBConnectionString = "Server=127.0.0.1; Database=test; User Id=sa; Password=<YourStrong@Passw0rd>;TrustServerCertificate=True;" ,
221235 DBQuery = "select id as sqlId from dbo.sampleTable;" ,
222236 DBFields = new List < Param >
@@ -248,6 +262,7 @@ private static void CreateConfigForDatabaseBasedAPIComparrisonCall(string pathCo
248262 HeaderParam = new List < Param > {
249263 new Param ( "accept" , "application/json" )
250264 } ,
265+ RequestBody = null ,
251266 DBConnectionString = "Server=127.0.0.1; Database=test; User Id=sa; Password=<YourStrong@Passw0rd>;TrustServerCertificate=True;" ,
252267 DBQuery = "select id as sqlId from dbo.sampleTable;" ,
253268 DBFields = new List < Param >
@@ -262,6 +277,35 @@ private static void CreateConfigForDatabaseBasedAPIComparrisonCall(string pathCo
262277
263278 _ = IndividualActions . CreateConfig ( DirectoryServices . AssemblyDirectory , pathConfigJson , config ) ;
264279 }
280+
281+
282+ private static void CreateConfigForSingleAPICallWithUrlParamAndBodyModel ( string pathConfigJson )
283+ {
284+ Config config = new ( )
285+ {
286+ UrlBase = "https://localhost:7055" ,
287+ CompareUrlBase = string . Empty ,
288+ CompareUrlPath = string . Empty ,
289+ UrlPath = "/datamodel/123456789" ,
290+ UrlParam = new List < Param >
291+ {
292+ new Param ( "location" , "UK" )
293+ } ,
294+ HeaderParam = new List < Param > {
295+ new Param ( "accept" , "application/json" )
296+ } ,
297+ RequestBody = "{Id={sqlId},StaticData=\" data\" }" ,
298+ DBConnectionString = null ,
299+ DBQuery = null ,
300+ DBFields = null ,
301+ RequestType = RequestType . GET ,
302+ ResultsStoreOption = StoreResultsOption . None ,
303+ ConfigMode = TesterConfigMode . Run ,
304+ LogLocation = DirectoryServices . AssemblyDirectory
305+ } ;
306+
307+ _ = IndividualActions . CreateConfig ( DirectoryServices . AssemblyDirectory , pathConfigJson , config ) ;
308+ }
265309 }
266310
267311 public class IndividualActions
0 commit comments