Class: | SampleAppPlus.AddText |
---|---|
Assembly: | SampleAppPlus |
File(s): | C:\SampleAppPlus\SampleAppPlus\AddText.xaml C:\SampleAppPlus\SampleAppPlus\AddText.xaml.cs |
Covered lines: | 15 |
Uncovered lines: | 0 |
Coverable lines: | 15 |
Total lines: | 60 |
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(...) | 5 | 100 | 100 |
# | Line | Line coverage | ||
---|---|---|---|---|
3 | 1 | <Window x:Class="SampleAppPlus.AddText" | ||
2 | xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |||
3 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |||
4 | Title="Add Text" Height="150" Width="300"> | |||
5 | <Grid> | |||
6 | <Label Content="Text" | |||
7 | HorizontalAlignment="Left" | |||
8 | VerticalAlignment="Top" | |||
9 | Margin="20,20,0,20" /> | |||
10 | <TextBox x:Name="text" | |||
11 | Height="30" | |||
12 | Width="200" | |||
13 | HorizontalAlignment="Left" | |||
14 | VerticalAlignment="Top" | |||
15 | Margin="70,20,0,20" /> | |||
16 | <Button Content="Save" | |||
17 | Height="30" | |||
18 | Width="70" | |||
19 | HorizontalAlignment="Left" | |||
20 | VerticalAlignment="Bottom" | |||
3 | 21 | Click="buttonSave_Click" | ||
22 | Name="buttonSave" | |||
23 | Margin="20,0,0,20" /> | |||
24 | <Button Content="Cancel" | |||
25 | Height="30" | |||
26 | Width="70" | |||
27 | HorizontalAlignment="Right" | |||
28 | VerticalAlignment="Bottom" | |||
3 | 29 | Click="buttonCancel_Click" | ||
30 | Name="buttonCancel" | |||
31 | Margin="0,0,20,20" /> | |||
32 | </Grid> | |||
33 | </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 AddText : Window | |||
9 | { | |||
3 | 10 | public AddText() | ||
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 | } |