Summary

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%

Metrics

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

File(s)

C:\SampleAppPlus\SampleAppPlus\AddText.xaml

#LineLine coverage
 31<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"
 321                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"
 329                Click="buttonCancel_Click"
 30                Name="buttonCancel"
 31                Margin="0,0,20,20" />
 32    </Grid>
 33</Window>

C:\SampleAppPlus\SampleAppPlus\AddText.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 AddText : Window
 9    {
 310        public AddText()
 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}