public async Task GetAsync_WhenCalled_ShouldGet()
        {
            var attachment = await _resource.GetAsync(1);

            Assert.Equal(1, attachment.Id);
            Assert.Equal("filename.1", attachment.FileName);
        }
Example #2
0
        public async Task ShouldGetAttachmentById()
        {
            var byteArray = Encoding.UTF8.GetBytes("Hi there guys!");
            var stream    = new MemoryStream(byteArray);

            var response = await _resource
                           .UploadAsync("crash.log", stream, "6bk3gql82em5nmf");

            var attachment = await _resource.GetAsync(response.Attachment.Id.Value);

            Assert.Equal(JsonConvert.SerializeObject(response.Attachment), JsonConvert.SerializeObject(attachment));
        }