public void Write_object() { var stream = new MemoryStream(Encoding.UTF8.GetBytes(DATA)); var readerWriter = new GcsObjectReaderWriter(); readerWriter.WriteObject(stream, KEY, BUCKET_NAME); }
public void Write_object_throws_exception_on_failure() { var stream = new MemoryStream(Encoding.UTF8.GetBytes(DATA)); var readerWriter = new GcsObjectReaderWriter(); Assert.Throws <ArgumentNullException>(() => { // Exceptions from GCS lack clarity it seems... readerWriter.WriteObject(stream, KEY, "no-such-bucket"); }); }