mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-07 20:30:41 +00:00
added some tests around uploading assets
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Octokit.Tests.Integration
|
||||
{
|
||||
@@ -57,5 +59,17 @@ namespace Octokit.Tests.Integration
|
||||
{
|
||||
return string.Concat(name, "-", DateTime.UtcNow.ToString("yyyyMMddhhmmssfff"));
|
||||
}
|
||||
|
||||
public static Stream LoadFixture(string fileName)
|
||||
{
|
||||
var key = "Octokit.Tests.Integration.fixtures." + fileName;
|
||||
var stream = typeof(Helper).Assembly.GetManifestResourceStream(key);
|
||||
if (stream == null)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"The file '" + fileName + "' was not found as an embedded resource in the assembly. Failing the test...");
|
||||
}
|
||||
return stream;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user