11using Quartz ;
22using Quartz . Core ;
33using Quartz . Impl ;
4+ using TransactionProcessing . SchedulerService . Jobs . Configuration ;
5+ using TransactionProcessing . SchedulerService . Jobs . Jobs ;
46
57namespace JobTestDriver
68{
@@ -14,7 +16,7 @@ namespace JobTestDriver
1416
1517 internal class Program {
1618 static async Task Main ( string [ ] args ) {
17-
19+
1820 //List<(String groupName, String streamName, Int64 parkedMessageCount)>? info = await Jobs.GetParkedQueueInformation("esdb://admin:changeit@192.168.0.133:2113?tls=false&tlsVerifyCert=false", CancellationToken.None);
1921 //foreach ((String groupName, String streamName, Int64 parkedMessageCount) infoItem in info){
2022 // Console.WriteLine($"Group: {infoItem.groupName} Stream: {infoItem.streamName} Parked Count: {infoItem.parkedMessageCount}");
@@ -37,39 +39,49 @@ static async Task Main(string[] args){
3739 // messagingServiceClient,
3840 // CancellationToken.None);
3941
40- //HttpClientHandler handler = new HttpClientHandler
41- // {
42- // ServerCertificateCustomValidationCallback = (message,
43- // cert,
44- // chain,
45- // errors) => {
46- // return true;
47- // }
48- // };
49- //HttpClient client = new HttpClient(handler);
50- //ISecurityServiceClient securityServiceClient = new SecurityServiceClient(delegate(String s){ return "https://192.168.1.167:5001"; },client); IEstateClient estateClient = new EstateClient(delegate (String s) { return "http://192.168.1.167:5000"; }, client);
51- //ITransactionProcessorClient transactionProcessorClient = new TransactionProcessorClient(delegate (String s) { return "https://eojrtqfzvyheu0l.m.pipedream.net"; }, client);
52- //String estateManagementApi = "http://192.168.1.167:5000";
53- //String fileProcessorApi = "http://192.168.1.167:5009";
54- //String testHostApi = "http://192.168.1.167:9000";
55- //String clientId = "serviceClient";
56- //String clientSecret = "d192cbc46d834d0da90e8a9d50ded543";
42+ HttpClientHandler handler = new HttpClientHandler
43+ {
44+ ServerCertificateCustomValidationCallback = ( message ,
45+ cert ,
46+ chain ,
47+ errors ) =>
48+ {
49+ return true ;
50+ }
51+ } ;
52+ HttpClient client = new HttpClient ( handler ) ;
53+ ISecurityServiceClient securityServiceClient = new SecurityServiceClient ( delegate ( String s ) { return "https://192.168.1.167:5001" ; } , client ) ; IEstateClient estateClient = new EstateClient ( delegate ( String s ) { return "http://192.168.1.167:5000" ; } , client ) ;
54+ ITransactionProcessorClient transactionProcessorClient = new TransactionProcessorClient ( delegate ( String s ) { return "https://eojrtqfzvyheu0l.m.pipedream.net" ; } , client ) ;
55+ String estateManagementApi = "http://192.168.1.167:5000" ;
56+ String fileProcessorApi = "http://192.168.1.167:5009" ;
57+ String testHostApi = "http://192.168.1.167:9000" ;
58+ String clientId = "serviceClient" ;
59+ String clientSecret = "d192cbc46d834d0da90e8a9d50ded543" ;
60+
61+ ITransactionDataGenerator t = new TransactionDataGenerator ( securityServiceClient ,
62+ estateClient ,
63+ transactionProcessorClient ,
64+ estateManagementApi ,
65+ fileProcessorApi ,
66+ testHostApi ,
67+ clientId ,
68+ clientSecret ,
69+ RunningMode . WhatIf ) ;
70+ Guid estateId = Guid . Parse ( "435613ac-a468-47a3-ac4f-649d89764c22" ) ;
71+
72+ MakeFloatCreditsJobConfig c = new MakeFloatCreditsJobConfig ( clientId , clientSecret , estateManagementApi , fileProcessorApi , "" , "" , "" , estateId ,
73+ new List < DepositAmount > { new DepositAmount ( Guid . NewGuid ( ) , Guid . NewGuid ( ) , 100 ) }
74+ ) ;
5775
58- //ITransactionDataGenerator t = new TransactionDataGenerator(securityServiceClient,
59- // estateClient,
60- // transactionProcessorClient,
61- // estateManagementApi,
62- // fileProcessorApi,
63- // testHostApi,
64- // clientId,
65- // clientSecret,
66- // RunningMode.Live);
67- //Guid estateId = Guid.Parse("435613ac-a468-47a3-ac4f-649d89764c22");
76+ await Jobs . GenerateFloatCredits ( t , c , CancellationToken . None ) ;
6877 //Guid merchantId = Guid.Parse("ab1c99fb-1c6c-4694-9a32-b71be5d1da33");
6978 //await Jobs.GenerateTransactions(t, estateId, merchantId, false, CancellationToken.None);
7079 ////var d = TransactionDataGenerator.GetTransactionDateTime(new Random(), DateTime.Now);
7180 ////Console.WriteLine(d);
7281 //await Jobs.PerformSettlement(t, DateTime.Now,estateId, CancellationToken.None);
82+
83+
84+
7385 }
7486 }
7587}
0 commit comments