@@ -491,6 +491,75 @@ public void testSqlAckTrialOrPlatinumToNotTrialOrPlatinum() {
491
491
assertAckMessages (XPackField .SQL , randomTrialOrPlatinumMode (), randomBasicStandardOrGold (), 1 );
492
492
}
493
493
494
+ public void testCcrDefaults () {
495
+ final XPackLicenseState state = new XPackLicenseState (Settings .EMPTY );
496
+ assertTrue (state .isCcrAllowed ());
497
+ }
498
+
499
+ public void testCcrBasic () {
500
+ final XPackLicenseState state = new XPackLicenseState (Settings .EMPTY );
501
+ state .update (BASIC , true , null );
502
+
503
+ assertThat (state .isCcrAllowed (), is (false ));
504
+ }
505
+
506
+ public void testCcrBasicExpired () {
507
+ final XPackLicenseState state = new XPackLicenseState (Settings .EMPTY );
508
+ state .update (BASIC , false , null );
509
+
510
+ assertThat (state .isCcrAllowed (), is (false ));
511
+ }
512
+
513
+ public void testCcrStandard () {
514
+ final XPackLicenseState state = new XPackLicenseState (Settings .EMPTY );
515
+ state .update (STANDARD , true , null );
516
+
517
+ assertThat (state .isCcrAllowed (), is (false ));
518
+ }
519
+
520
+ public void testCcrStandardExpired () {
521
+ final XPackLicenseState state = new XPackLicenseState (Settings .EMPTY );
522
+ state .update (STANDARD , false , null );
523
+
524
+ assertThat (state .isCcrAllowed (), is (false ));
525
+ }
526
+
527
+ public void testCcrGold () {
528
+ final XPackLicenseState state = new XPackLicenseState (Settings .EMPTY );
529
+ state .update (GOLD , true , null );
530
+
531
+ assertThat (state .isCcrAllowed (), is (false ));
532
+ }
533
+
534
+ public void testCcrGoldExpired () {
535
+ final XPackLicenseState state = new XPackLicenseState (Settings .EMPTY );
536
+ state .update (GOLD , false , null );
537
+
538
+ assertThat (state .isCcrAllowed (), is (false ));
539
+ }
540
+
541
+ public void testCcrPlatinum () {
542
+ final XPackLicenseState state = new XPackLicenseState (Settings .EMPTY );
543
+ state .update (PLATINUM , true , null );
544
+
545
+ assertTrue (state .isCcrAllowed ());
546
+ }
547
+
548
+ public void testCcrPlatinumExpired () {
549
+ final XPackLicenseState state = new XPackLicenseState (Settings .EMPTY );
550
+ state .update (PLATINUM , false , null );
551
+
552
+ assertFalse (state .isCcrAllowed ());
553
+ }
554
+
555
+ public void testCcrAckAnyToTrialOrPlatinum () {
556
+ assertAckMessages (XPackField .CCR , randomMode (), randomTrialOrPlatinumMode (), 0 );
557
+ }
558
+
559
+ public void testCcrAckTrialOrPlatinumToNotTrialOrPlatinum () {
560
+ assertAckMessages (XPackField .CCR , randomTrialOrPlatinumMode (), randomBasicStandardOrGold (), 1 );
561
+ }
562
+
494
563
public void testTransformBasic () throws Exception {
495
564
assertAllowed (BASIC , true , XPackLicenseState ::isTransformAllowed , true );
496
565
}
0 commit comments