-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathQuestionTests.cs
More file actions
47 lines (39 loc) · 1.06 KB
/
QuestionTests.cs
File metadata and controls
47 lines (39 loc) · 1.06 KB
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
42
43
44
45
46
47
using GHPT.Serialization;
using GHPT.Utils;
using NUnit.Framework;
using System.Collections;
using System.Threading.Tasks;
namespace UnitTests
{
public sealed class QuestionTests
{
[SetUp]
public static void SetupToken()
{
bool configured = ConfigUtil.CheckConfiguration();
if (!configured)
{
ConfigUtil.PromptUserForConfig();
}
else
{
ConfigUtil.LoadConfig();
}
Assert.That(ConfigUtil.CheckConfiguration(), Is.True);
}
[TestCaseSource(nameof(Queries))]
public async Task GetResponseDataTest(string question)
{
PromptData data = await PromptUtils.AskQuestion(question);
Assert.That(data.Connections, Is.Not.Empty);
Assert.That(data.Additions, Is.Not.Empty);
}
public static IEnumerable Queries
{
get
{
yield return "How can I Create a Cylinder?";
}
}
}
}