Exemplo n.º 1
0
        public void WhenITryToGetListOfAllExistingFiles()
        {
            var response = new DropboxApi().GetFilesList();

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

            response.EnsureSuccessful();
            ContextHelper.AddToContext("LastApiResponse", response);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }