예제 #1
0
        public void WhenITryToGetListOfAllExistingFiles()
        {
            var response = new DropboxApi().GetFilesList();

            response.EnsureSuccessful();
            ContextHelper.AddToContext("LastApiResponse", response);
        }
예제 #2
0
        public void GivenISendReqestToCreateAFolder()
        {
            var response = new DropboxApi().CreateFileFolder("/Test1234Test/Test4");

            response.EnsureSuccessful();
            ContextHelper.AddToContext("LastApiResponse", response);
        }
예제 #3
0
        public void WhenIUploadTheFile(UploadFileDto uploadFile)
        {
            var filePath = ContextHelper.GetFromContext <string>("FilePath");
            var file     = File.ReadAllBytes(filePath);
            var response = new DropboxApiContent().UploadFile(uploadFile, file);

            response.EnsureSuccessful();
            ContextHelper.AddToContext("LastApiResponse", response);
        }
예제 #4
0
        public void GivenIHaveFileToUpload(string fileName)
        {
            var filePath = GetFilePath(fileName);

            File.Exists(filePath)
            .Should()
            .BeTrue($"expected {fileName} to exists with test fata files inside the {filePath}");

            ContextHelper.AddToContext("FilePath", filePath);
        }