| Class: | SampleAppPlus.EditText |
|---|---|
| Assembly: | SampleAppPlus |
| File(s): | C:\SampleAppPlus\SampleAppPlus\EditText.xaml C:\SampleAppPlus\SampleAppPlus\EditText.xaml.cs |
| Covered lines: | 15 |
| Uncovered lines: | 0 |
| Coverable lines: | 15 |
| Total lines: | 71 |
| Line coverage: | 100% |
| Method | Cyclomatic Complexity | Sequence Coverage | Branch Coverage |
|---|---|---|---|
| .ctor() | 1 | 100 | 100 |
| buttonSave_Click(...) | 1 | 100 | 100 |
| buttonCancel_Click(...) | 1 | 100 | 100 |
| InitializeComponent() | 2 | 100 | 100 |
| System.Windows.Markup.IComponentConnector.Connect(...) | 6 | 100 | 100 |
| # | Line | Line coverage | ||
|---|---|---|---|---|
| 3 | 1 | <Window x:Class="SampleAppPlus.EditText" | ||
2 | xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |||
3 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |||
4 | Title="Edit Text" Height="220" Width="300"> | |||
5 | <Grid> | |||
6 | <Label Content="Text" | |||
7 | HorizontalAlignment="Left" | |||
8 | VerticalAlignment="Top" | |||
9 | Margin="20,20,0,20" /> | |||
10 | <TextBox Visibility="Hidden"/> | |||
11 | <TextBox x:Name="text" | |||
12 | Height="30" | |||
13 | Width="200" | |||
14 | HorizontalAlignment="Left" | |||
15 | VerticalAlignment="Top" | |||
16 | Margin="70,20,0,20" /> | |||
17 | <Label Content="Current Text" | |||
18 | HorizontalAlignment="Left" | |||
19 | VerticalAlignment="Top" | |||
20 | Margin="20,70,0,20" /> | |||
21 | <TextBlock x:Name="currentText" | |||
22 | Height="30" | |||
23 | Width="170" | |||
24 | HorizontalAlignment="Left" | |||
25 | VerticalAlignment="Top" | |||
26 | Margin="100,70,0,20" /> | |||
27 | <Button Content="Save" | |||
28 | Height="30" | |||
29 | Width="70" | |||
30 | HorizontalAlignment="Left" | |||
31 | VerticalAlignment="Bottom" | |||
| 3 | 32 | Click="buttonSave_Click" | ||
33 | Name="buttonSave" | |||
34 | Margin="20,0,0,20" /> | |||
35 | <Button Content="Cancel" | |||
36 | Height="30" | |||
37 | Width="70" | |||
38 | HorizontalAlignment="Right" | |||
39 | VerticalAlignment="Bottom" | |||
| 3 | 40 | Click="buttonCancel_Click" | ||
41 | Name="buttonCancel" | |||
42 | Margin="0,0,20,20" /> | |||
43 | </Grid> | |||
44 | </Window> |
| # | Line | Line coverage | ||
|---|---|---|---|---|
1 | using System.Windows; | |||
2 | | |||
3 | namespace SampleAppPlus | |||
4 | { | |||
5 | /// <summary> | |||
6 | /// Interaction logic for AddText.xaml | |||
7 | /// </summary> | |||
8 | public partial class EditText : Window | |||
9 | { | |||
| 3 | 10 | public EditText() | ||
| 3 | 11 | { | ||
| 3 | 12 | InitializeComponent(); | ||
| 3 | 13 | } | ||
14 | | |||
15 | private void buttonSave_Click(object sender, RoutedEventArgs e) | |||
| 2 | 16 | { | ||
| 2 | 17 | DialogResult = true; | ||
| 2 | 18 | Close(); | ||
| 2 | 19 | } | ||
20 | | |||
21 | private void buttonCancel_Click(object sender, RoutedEventArgs e) | |||
| 1 | 22 | { | ||
| 1 | 23 | DialogResult = false; | ||
| 1 | 24 | Close(); | ||
| 1 | 25 | } | ||
26 | } | |||
27 | } |