Exemple #1
0
        public void FolderFileParameters()
        {
            var queryParams = new Dictionary <string, string>()
            {
                { "marker", "1" }, { "max-keys", "100" }
            };
            string uri = S3V4URLHelpers.CreateURIString("us-west-2", "dxw", "MyFolder/MyFile1.txt", queryParams);

            Assert.AreEqual("https://dxw.s3-us-west-2.amazonaws.com/MyFolder/MyFile1.txt?marker=1&max-keys=100", uri);
        }
Exemple #2
0
        public void FolderFileParametersEncoding()
        {
            var queryParams = new Dictionary <string, string>()
            {
                { "delimiter", "/" }
            };
            string uri = S3V4URLHelpers.CreateURIString("us-west-2", "dxw", "MyFolder/", queryParams);

            Assert.AreEqual("https://dxw.s3-us-west-2.amazonaws.com/MyFolder/?delimiter=%2F", uri);
        }
Exemple #3
0
        public void FolderFileParameterEmpty()
        {
            var queryParams = new Dictionary <string, string>()
            {
                { "acl", "" }
            };
            string uri = S3V4URLHelpers.CreateURIString("us-west-2", "dxw", "MyFolder/MyFile1.txt", queryParams);

            Assert.AreEqual("https://dxw.s3-us-west-2.amazonaws.com/MyFolder/MyFile1.txt?acl=", uri);
        }
Exemple #4
0
        public void FolderFile()
        {
            string uri = S3V4URLHelpers.CreateURIString("us-west-2", "dxw", "MyFolder/MyFile1.txt");

            Assert.AreEqual("https://dxw.s3-us-west-2.amazonaws.com/MyFolder/MyFile1.txt", uri);
        }
Exemple #5
0
        public void BucketRoot()
        {
            string uri = S3V4URLHelpers.CreateURIString("us-west-2", "dxw");

            Assert.AreEqual("https://dxw.s3-us-west-2.amazonaws.com/", uri);
        }
Exemple #6
0
        public void EmptyRegion()
        {
            string uri = S3V4URLHelpers.CreateURIString();

            Assert.AreEqual("https://s3.amazonaws.com/", uri);
        }
Exemple #7
0
        public void FolderRoot()
        {
            string uri = S3V4URLHelpers.CreateURIString("us-west-2", "dxw", "MyFolder/");

            Aver.AreEqual("https://dxw.s3-us-west-2.amazonaws.com/MyFolder/", uri);
        }