public void ShouldReplaceTextFileContentsAsync()
        {
            // Arrange
            IFilesApi filesApi = CreateFilesApi();

            // Act & Assert
            filesApi.ReplaceFileContentsAsync("calendar/test.txt", "Bye").Wait();

            Should.Throw <ArgumentNullException>(() => filesApi.ReplaceFileContentsAsync("calendar/test.txt", (string)null));
            Should.Throw <ArgumentNullException>(() => filesApi.ReplaceFileContentsAsync(null, "Bye"));
        }
Beispiel #2
0
        public void ShouldReplaceTextFileContentsAsync()
        {
            // Arrange
            IFilesApi filesApi = CreateFilesApi();

            // Act & Assert
            filesApi.ReplaceFileContentsAsync("applications", "calendar/test.txt", "Bye").Wait();
        }
        public void ShouldReplaceBinaryFileContentsAsync()
        {
            // Arrange
            IFilesApi filesApi = CreateFilesApi();

            byte[] data = { 50, 51, 52, 53, 54, 55, 56, 57 };

            // Act & Assert
            filesApi.ReplaceFileContentsAsync("calendar/test.bin", data).Wait();
        }