using Google.Apis.Util;
using Xunit;
using static Google.Apis.Storage.v1.BucketsResource;

namespace Google.Cloud.Storage.V1.Tests
{
    public class TestBucketIamPermissionsOptionsTest
    {
        [Fact]
        public void ModifyRequest_DefaultOptions()
        {
            var request = new TestIamPermissionsRequest(null, "bucket", new Repeatable<string>(new string[0]));
            var options = new TestBucketIamPermissionsOptions();
            options.ModifyRequest(request);
            Assert.Null(request.UserProject);
        }

        [Fact]
        public void ModifyRequest_AllOptions()
        {
            var request = new TestIamPermissionsRequest(null, "bucket", new Repeatable<string>(new string[0]));
            var options = new TestBucketIamPermissionsOptions
            {
                UserProject = "proj"
            };
            options.ModifyRequest(request);
            Assert.Equal("proj", request.UserProject);
        }
    }
}
