Summary

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%

Metrics

MethodCyclomatic ComplexitySequence CoverageBranch Coverage
.ctor()1100100
buttonSave_Click(...)1100100
buttonCancel_Click(...)1100100
InitializeComponent()2100100
System.Windows.Markup.IComponentConnector.Connect(...)6100100

File(s)

C:\SampleAppPlus\SampleAppPlus\EditText.xaml

#LineLine coverage
 31<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"
 332                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"
 340                Click="buttonCancel_Click"
 41                Name="buttonCancel"
 42                Margin="0,0,20,20" />
 43    </Grid>
 44</Window>

C:\SampleAppPlus\SampleAppPlus\EditText.xaml.cs

#LineLine coverage
 1using System.Windows;
 2
 3namespace SampleAppPlus
 4{
 5    /// <summary>
 6    /// Interaction logic for AddText.xaml
 7    /// </summary>
 8    public partial class EditText : Window
 9    {
 310        public EditText()
 311        {
 312            InitializeComponent();
 313        }
 14
 15        private void buttonSave_Click(object sender, RoutedEventArgs e)
 216        {
 217            DialogResult = true;
 218            Close();
 219        }
 20
 21        private void buttonCancel_Click(object sender, RoutedEventArgs e)
 122        {
 123            DialogResult = false;
 124            Close();
 125        }
 26    }
 27}