public void WhenITryToGetListOfAllExistingFiles() { var response = new DropboxApi().GetFilesList(); response.EnsureSuccessful(); ContextHelper.AddToContext("LastApiResponse", response); }
public void GivenISendReqestToCreateAFolder() { var response = new DropboxApi().CreateFileFolder("/Test1234Test/Test4"); response.EnsureSuccessful(); ContextHelper.AddToContext("LastApiResponse", response); }
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); }
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); }