-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
GistGithubUtilsTests.cs
41 lines (35 loc) · 1.28 KB
/
GistGithubUtilsTests.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
using NUnit.Framework;
using RevitAddin.CommandLoader.Services;
using System;
namespace RevitAddin.CommandLoader.Tests
{
public class GistGithubUtilsTests
{
private const string GIST_SOURCE = "https://gist.github.com/ricaun/200a576c3baa45cba034ceedac1e708e";
[Test]
public void Test_TryGetGistFilesContent()
{
var hasGistContent = GistGithubUtils.TryGetGistFilesContent(GIST_SOURCE, out string[] contents);
Assert.IsTrue(hasGistContent, "Gist content not found.");
}
[Test]
public void Test_TryGetGistModel()
{
var hasGistContent = GistGithubUtils.TryGetGistModel(GIST_SOURCE, out var model);
Assert.IsTrue(hasGistContent, "Gist content not found.");
}
[Test]
public void Test_TryGetGistId()
{
var hasGistContent = GistGithubUtils.TryGetGistId(GIST_SOURCE, out var id);
Assert.IsTrue(hasGistContent, "Gist content not found.");
Console.WriteLine(id);
}
[Test]
public void Test_TryGetGistString()
{
var hasGistContent = GistGithubUtils.TryGetGistString(GIST_SOURCE, out string content);
Assert.IsTrue(hasGistContent, "Gist content not found.");
}
}
}