Code Coverage Statistics for Source File
C:\Users\Marcus\Documents\MyCode\2007\SharpSelectWord\SharpSelectWordTest\Src\TestHelper.cs
|
Sequence Point Coverage
N/A
0 of 0
|
Branch Coverage
N/A
0 of 0
|
Lines
40
|
Highlight:
Uncovered Code
Covered Code
| L | V | Source |
|---|---|---|
1 |
using System.Drawing; |
|
2 |
using ICSharpCode.TextEditor; |
|
3 |
using ICSharpCode.TextEditor.Document; |
|
4 |
||
5 |
namespace MarcusHolmgren.SharpDevelop.SelectWordTest |
|
6 |
{ |
|
7 |
class TestHelper |
|
8 |
{ |
|
9 |
internal static void CallAllProperties(ISelection selection) |
|
10 |
{ |
|
11 |
selection.ContainsOffset(0); |
|
12 |
selection.ContainsPosition(TextLocation.Empty); |
|
13 |
int offset = selection.EndOffset; |
|
14 |
TextLocation position = selection.EndPosition; |
|
15 |
bool empty = selection.IsEmpty; |
|
16 |
bool rectangularSelection = selection.IsRectangularSelection; |
|
17 |
int length = selection.Length; |
|
18 |
int offset2 = selection.Offset; |
|
19 |
string text = selection.SelectedText; |
|
20 |
TextLocation startPosition = selection.StartPosition; |
|
21 |
} |
|
22 |
||
23 |
internal static IDocument MakeDocument(string message) |
|
24 |
{ |
|
25 |
IDocument document = new DocumentFactory().CreateDocument(); |
|
26 |
document.TextContent = message; |
|
27 |
||
28 |
return document; |
|
29 |
} |
|
30 |
||
31 |
internal static IDocument MakeDocument(string message, out int offset) |
|
32 |
{ |
|
33 |
IDocument document = new DocumentFactory().CreateDocument(); |
|
34 |
offset = message.IndexOf('|'); |
|
35 |
document.TextContent = message.Remove(offset, 1); |
|
36 |
||
37 |
return document; |
|
38 |
} |
|
39 |
} |
|
40 |
} |