@@ -504,4 +504,73 @@ public void testSqlAckTrialOrPlatinumToNotTrialOrPlatinum() {
504
504
assertAckMesssages (XPackField .SQL , randomTrialOrPlatinumMode (), randomBasicStandardOrGold (), 1 );
505
505
}
506
506
507
+ public void testCcrDefaults () {
508
+ final XPackLicenseState state = new XPackLicenseState (Settings .EMPTY );
509
+ assertTrue (state .isCcrAllowed ());
510
+ }
511
+
512
+ public void testCcrBasic () {
513
+ final XPackLicenseState state = new XPackLicenseState (Settings .EMPTY );
514
+ state .update (BASIC , true , null );
515
+
516
+ assertThat (state .isCcrAllowed (), is (false ));
517
+ }
518
+
519
+ public void testCcrBasicExpired () {
520
+ final XPackLicenseState state = new XPackLicenseState (Settings .EMPTY );
521
+ state .update (BASIC , false , null );
522
+
523
+ assertThat (state .isCcrAllowed (), is (false ));
524
+ }
525
+
526
+ public void testCcrStandard () {
527
+ final XPackLicenseState state = new XPackLicenseState (Settings .EMPTY );
528
+ state .update (STANDARD , true , null );
529
+
530
+ assertThat (state .isCcrAllowed (), is (false ));
531
+ }
532
+
533
+ public void testCcrStandardExpired () {
534
+ final XPackLicenseState state = new XPackLicenseState (Settings .EMPTY );
535
+ state .update (STANDARD , false , null );
536
+
537
+ assertThat (state .isCcrAllowed (), is (false ));
538
+ }
539
+
540
+ public void testCcrGold () {
541
+ final XPackLicenseState state = new XPackLicenseState (Settings .EMPTY );
542
+ state .update (GOLD , true , null );
543
+
544
+ assertThat (state .isCcrAllowed (), is (false ));
545
+ }
546
+
547
+ public void testCcrGoldExpired () {
548
+ final XPackLicenseState state = new XPackLicenseState (Settings .EMPTY );
549
+ state .update (GOLD , false , null );
550
+
551
+ assertThat (state .isCcrAllowed (), is (false ));
552
+ }
553
+
554
+ public void testCcrPlatinum () {
555
+ final XPackLicenseState state = new XPackLicenseState (Settings .EMPTY );
556
+ state .update (PLATINUM , true , null );
557
+
558
+ assertTrue (state .isCcrAllowed ());
559
+ }
560
+
561
+ public void testCcrPlatinumExpired () {
562
+ final XPackLicenseState state = new XPackLicenseState (Settings .EMPTY );
563
+ state .update (PLATINUM , false , null );
564
+
565
+ assertFalse (state .isCcrAllowed ());
566
+ }
567
+
568
+ public void testCcrAckAnyToTrialOrPlatinum () {
569
+ assertAckMesssages (XPackField .CCR , randomMode (), randomTrialOrPlatinumMode (), 0 );
570
+ }
571
+
572
+ public void testCcrAckTrialOrPlatinumToNotTrialOrPlatinum () {
573
+ assertAckMesssages (XPackField .CCR , randomTrialOrPlatinumMode (), randomBasicStandardOrGold (), 1 );
574
+ }
575
+
507
576
}
0 commit comments