-
Notifications
You must be signed in to change notification settings - Fork 178
/
ProgressOutput.cs
71 lines (57 loc) · 1.3 KB
/
ProgressOutput.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
using Machine.Specifications.Runner;
namespace Machine.Specifications.ConsoleRunner.Outputs
{
class ProgressOutput : IOutput
{
readonly IConsole _console;
public ProgressOutput(IConsole console)
{
_console = console;
}
public void RunStart()
{
}
public void RunEnd()
{
EmptyLine();
}
public void AssemblyStart(AssemblyInfo assembly)
{
EmptyLine();
_console.WriteLine("Specs in " + assembly.Name + ":");
}
public void AssemblyEnd(AssemblyInfo assembly)
{
EmptyLine();
}
public void ContextStart(ContextInfo context)
{
}
public void ContextEnd(ContextInfo context)
{
}
public void SpecificationStart(SpecificationInfo specification)
{
}
public void Passing(SpecificationInfo specification)
{
_console.Write(".");
}
public void NotImplemented(SpecificationInfo specification)
{
_console.Write("*");
}
public void Ignored(SpecificationInfo specification)
{
_console.Write("I");
}
public void Failed(SpecificationInfo specification, Result exception)
{
_console.Write("F");
}
void EmptyLine()
{
_console.WriteLine("");
}
}
}