Example #1
0
    public void TestEnableBucketDefaultEventBasedHold()
    {
        EnableBucketDefaultEventBasedHoldSample enableBucketDefaultEventBasedHoldSample = new EnableBucketDefaultEventBasedHoldSample();
        DisableDefaultEventBasedHoldSample      disableDefaultEventBasedHoldSample      = new DisableDefaultEventBasedHoldSample();

        // Enable default event based hold.
        var updatedBucket = enableBucketDefaultEventBasedHoldSample.EnableBucketDefaultEventBasedHold(_fixture.BucketNameGeneric);

        _fixture.SleepAfterBucketCreateUpdateDelete();
        Assert.True(updatedBucket.DefaultEventBasedHold);

        // Disable default event based hold.
        disableDefaultEventBasedHoldSample.DisableDefaultEventBasedHold(_fixture.BucketNameGeneric);
        _fixture.SleepAfterBucketCreateUpdateDelete();
    }
    public void TestDisableDefaultEventBasedHold()
    {
        EnableBucketDefaultEventBasedHoldSample enableBucketDefaultEventBasedHoldSample = new EnableBucketDefaultEventBasedHoldSample();
        DisableDefaultEventBasedHoldSample      disableDefaultEventBasedHoldSample      = new DisableDefaultEventBasedHoldSample();

        //enable default event based hold
        enableBucketDefaultEventBasedHoldSample.EnableBucketDefaultEventBasedHold(_bucketFixture.BucketNameGeneric);
        _bucketFixture.SleepAfterBucketCreateUpdateDelete();

        //disable default event based hold
        var updatedBucket = disableDefaultEventBasedHoldSample.DisableDefaultEventBasedHold(_bucketFixture.BucketNameGeneric);

        _bucketFixture.SleepAfterBucketCreateUpdateDelete();
        Assert.False(updatedBucket.DefaultEventBasedHold);
    }
    public void TestGetDefaultEventBasedHold()
    {
        EnableBucketDefaultEventBasedHoldSample enableBucketDefaultEventBasedHoldSample = new EnableBucketDefaultEventBasedHoldSample();
        DisableDefaultEventBasedHoldSample      disableDefaultEventBasedHoldSample      = new DisableDefaultEventBasedHoldSample();
        GetDefaultEventBasedHoldSample          getDefaultEventBasedHoldSample          = new GetDefaultEventBasedHoldSample();

        // Enable default event based hold.
        enableBucketDefaultEventBasedHoldSample.EnableBucketDefaultEventBasedHold(_bucketFixture.BucketNameGeneric);
        _bucketFixture.SleepAfterBucketCreateUpdateDelete();

        // Get default event based hold.
        var defaultEventBasedHold = getDefaultEventBasedHoldSample.GetDefaultEventBasedHold(_bucketFixture.BucketNameGeneric);

        Assert.True(defaultEventBasedHold);

        // Disable default event based hold.
        disableDefaultEventBasedHoldSample.DisableDefaultEventBasedHold(_bucketFixture.BucketNameGeneric);
        _bucketFixture.SleepAfterBucketCreateUpdateDelete();
    }