-
-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathCompleteImmediatelyParser.Test.cs
More file actions
39 lines (36 loc) · 1.52 KB
/
CompleteImmediatelyParser.Test.cs
File metadata and controls
39 lines (36 loc) · 1.52 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
namespace MainCore.Test.Parsers
{
public class CompleteImmediatelyParser : BaseParser
{
private const string BuildingsWithEmptyQueue = "Parsers/CompleteImmediately/BuildingsWithEmptyQueue.html";
private const string BuildingsWithQueueHasOne = "Parsers/CompleteImmediately/BuildingsWithQueueHasOne.html";
private const string BuildingsWithQueueHasTwo = "Parsers/CompleteImmediately/BuildingsWithQueueHasTwo.html";
private const string ConfirmDialog = "Parsers/CompleteImmediately/ConfirmDialog.html";
[Theory]
[InlineData(BuildingsWithEmptyQueue, 0)]
[InlineData(BuildingsWithQueueHasOne, 1)]
[InlineData(BuildingsWithQueueHasTwo, 2)]
public void CountQueueBuilding(string path, int expected)
{
_html.Load(path);
var actual = MainCore.Parsers.CompleteImmediatelyParser.CountQueueBuilding(_html);
actual.ShouldBe(expected);
}
[Theory]
[InlineData(BuildingsWithQueueHasOne)]
[InlineData(BuildingsWithQueueHasTwo)]
public void GetCompleteButton(string path)
{
_html.Load(path);
var actual = MainCore.Parsers.CompleteImmediatelyParser.GetCompleteButton(_html);
actual.ShouldNotBeNull();
}
[Fact]
public void GetConfirmButton()
{
_html.Load(ConfirmDialog);
var actual = MainCore.Parsers.CompleteImmediatelyParser.GetConfirmButton(_html);
actual.ShouldNotBeNull();
}
}
}