Skip to content

Commit

Permalink
fix: relocate method definition
Browse files Browse the repository at this point in the history
  • Loading branch information
rzaracota committed Feb 12, 2024
1 parent ff325d4 commit d793640
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions integration-test-sdk-net60/AttachmentResourcesTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,19 +131,6 @@ private long AttachFileAndUrlToComment(SmartsheetClient smartsheet, long sheetId
return discussionCreated.Id.Value;
}

private void VerifyAttachmentContent(SmartsheetClient smartsheet, long sheetId, Attachment attachment)
{
attachment = smartsheet.SheetResources.AttachmentResources.GetAttachment(sheetId, attachment.Id.Value);

var request = new RestRequest(attachment.Url);

var attachmentContent = new RestClient(attachment.Url).Get(request).Content;

var fileContents = File.ReadAllText(path);

Assert.AreEqual(fileContents, attachmentContent);
}

private static long CreateSheet(SmartsheetClient smartsheet)
{
Column[] columnsToCreate = new Column[] {
Expand All @@ -156,5 +143,18 @@ private static long CreateSheet(SmartsheetClient smartsheet)
Assert.IsTrue(createdSheet.Columns[1].Title == "col 2");
return createdSheet.Id.Value;
}

private void VerifyAttachmentContent(SmartsheetClient smartsheet, long sheetId, Attachment attachment)
{
attachment = smartsheet.SheetResources.AttachmentResources.GetAttachment(sheetId, attachment.Id.Value);

var request = new RestRequest(attachment.Url);

var attachmentContent = new RestClient(attachment.Url).Get(request).Content;

var fileContents = File.ReadAllText(path);

Assert.AreEqual(fileContents, attachmentContent);
}
}
}

0 comments on commit d793640

Please sign in to comment.