コード例 #1
0
        public void ModifyRequest_DefaultOptions()
        {
            var request = new ListRequest(null, "project");
            var options = new ListBucketsOptions();

            options.ModifyRequest(request);
            Assert.Null(request.Projection);
            Assert.Null(request.Prefix);
            Assert.Null(request.MaxResults);
        }
コード例 #2
0
        public void ModifyRequest_AllOptions()
        {
            var request = new ListRequest(null, "project");
            var options = new ListBucketsOptions
            {
                PageSize   = 10,
                Prefix     = "prefix",
                Projection = Projection.Full
            };

            options.ModifyRequest(request);
            Assert.Equal(10, request.MaxResults);
            Assert.Equal("prefix", request.Prefix);
            Assert.Equal(ProjectionEnum.Full, request.Projection);
        }
コード例 #3
0
        public void ModifyRequest_AllOptions()
        {
            var request = new ListRequest(null, "project");
            var options = new ListBucketsOptions
            {
                PageSize   = 10,
                Prefix     = "prefix",
                Projection = Projection.Full,
                PageToken  = "nextpage",
                Fields     = "items(name),nextPageToken"
            };

            options.ModifyRequest(request);
            Assert.Equal(10, request.MaxResults);
            Assert.Equal("prefix", request.Prefix);
            Assert.Equal(ProjectionEnum.Full, request.Projection);
            Assert.Equal("nextpage", request.PageToken);
            Assert.Equal("items(name),nextPageToken", request.Fields);
        }