예제 #1
0
        //[TestMethod()]
        public async Task GetSharedLinkNotExistTest()
        {
            try
            {
                dropboxBase = new DropBoxBase();
                var url = await dropboxBase.GetSharedLink("dir2/trab_teste_sw.pdf");

                Assert.AreEqual(null, url);
                dropboxBase.Close();
            }
            catch (Exception e)
            {
                dropboxBase.Close();
                Console.Write(e.ToString());
                throw e;
            }
        }
예제 #2
0
        public async Task GetSharedLinkExistTest()
        {
            try
            {
                var urlExpected = "https://www.dropbox.com/s/j02x06nvxvlec33/math.jpg?dl=0";
                dropboxBase = new DropBoxBase();
                var url = await dropboxBase.GetSharedLink("dir1/math.jpg");

                dropboxBase.Close();

                Assert.AreEqual(urlExpected, url);
            }
            catch (Exception e)
            {
                dropboxBase.Close();
                Console.Write(e.ToString());
                throw e;
            }
        }