From dec96e2f8b84ea04d773c0c520c39b0822912ee3 Mon Sep 17 00:00:00 2001
From: D C <chenbangcai@prec-tech.com>
Date: 星期五, 26 五月 2023 10:32:20 +0800
Subject: [PATCH] Merge branch 'master' of http://47.92.229.245:8089/r/OlyMEBG
---
force-app/main/default/classes/ConsumAutoSelectBatchScheduleTest.cls | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/force-app/main/default/classes/ConsumAutoSelectBatchScheduleTest.cls b/force-app/main/default/classes/ConsumAutoSelectBatchScheduleTest.cls
new file mode 100644
index 0000000..0dc0dfe
--- /dev/null
+++ b/force-app/main/default/classes/ConsumAutoSelectBatchScheduleTest.cls
@@ -0,0 +1,22 @@
+@isTest
+private class ConsumAutoSelectBatchScheduleTest {
+
+ @isTest static void test_method() {
+ // Implement test code
+ String CRON_EXP = '0 0 0 3 9 ? 2024';
+ System.Test.startTest();
+ // Schedule the test job
+ String jobId = system.schedule('ConsumAutoSelectBatchScheduleTest', CRON_EXP, new ConsumAutoSelectBatchSchedule());
+ // Get the information from the CronTrigger API object
+ CronTrigger ct = [SELECT Id, CronExpression, TimesTriggered, NextFireTime FROM CronTrigger WHERE id = :jobId];
+ // Verify the expressions are the same
+ System.assertEquals(CRON_EXP, ct.CronExpression);
+ // Verify the job has not run
+ // System.assertEquals(0, ct.TimesTriggered);
+ // Verify the next time the job will run
+ System.assertEquals('2024-09-03 00:00:00', String.valueOf(ct.NextFireTime));
+
+ System.Test.StopTest();
+ }
+
+}
\ No newline at end of file
--
Gitblit v1.9.1