<commit_before>﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"                    
                    xmlns:err="clr-namespace:ErrorCode"
                    xmlns:domain="clr-namespace:ErrorCode.Domain">

    <HierarchicalDataTemplate DataType="{x:Type domain:TestAssembly}" ItemsSource="{Binding Mode=OneWay}">
        <Grid ToolTip="{Binding Name, Mode=OneWay}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />    
                <ColumnDefinition Width="*" />    
            </Grid.ColumnDefinitions>
            
            <Image Grid.Column="0" Source="/Resources/library_16.png" />
            <TextBlock Grid.Column="1">
                <Run Text="{Binding Name, Mode=OneWay}" />
                <Run Text="[" FontSize="9" />
                <Run Text="{Binding Count, Mode=OneWay}" FontSize="9" />
                <Run Text="]" FontSize="9" />
            </TextBlock>

            <Button Grid.Column="0"
                    Width="16" Height="16"
                    ToolTip="Run Assembly Tests" 
                    Command="{Binding Path=(err:Context.ViewModel).Commands.RunAllAssemblyTests, RelativeSource={RelativeSource Self}}"
                    CommandParameter="{Binding}"
                    HorizontalAlignment="Right"
                    BorderBrush="Transparent"
                    BorderThickness="0"
                    Opacity="0"
                    Style="{DynamicResource FadeOutButton}">
                <Path Data="M 6 0 L 6 12 L 12 6 Z" Fill="Black" Margin="-4 0 0 0" />
            </Button>
        </Grid>
    </HierarchicalDataTemplate>

    <HierarchicalDataTemplate DataType="{x:Type domain:TestClass}" ItemsSource="{Binding Mode=OneWay}">
        <Grid ToolTip="{Binding Name, Mode=OneWay}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>

            <Image Grid.Column="0" Source="/Resources/class_16.png" />
            <TextBlock Grid.Column="1">
                <Run Text="{Binding Name, Mode=OneWay}" />
                <Run Text="[" FontSize="9" />
                <Run Text="{Binding Count, Mode=OneWay}" FontSize="9" />
                <Run Text="]" FontSize="9" />
            </TextBlock>

            <Button Grid.Column="0"
                    Width="16" Height="16"
                    ToolTip="Run Assembly Tests" 
                    Command="{Binding Path=(err:Context.ViewModel).Commands.RunAllClassTests, RelativeSource={RelativeSource Self}}"
                    CommandParameter="{Binding}"
                    HorizontalAlignment="Right"
                    BorderBrush="Transparent"
                    BorderThickness="0"
                    Opacity="0"
                    Style="{DynamicResource FadeOutButton}">
                <Path Data="M 6 0 L 6 12 L 12 6 Z" Fill="Black" Margin="-4 0 0 0" />
            </Button>
        </Grid>
    </HierarchicalDataTemplate>

    <DataTemplate DataType="{x:Type domain:Test}">
        <Grid ToolTip="{Binding Name, Mode=OneWay}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>

            <Image x:Name="_icon" Grid.Column="0" Source="/Resources/test_16.png" />
            <TextBlock Grid.Column="1" Text="{Binding Name, Mode=OneWay}" />

            <Button Grid.Column="0"
                    Width="16" Height="16"
                    ToolTip="Run Assembly Tests" 
                    Command="{Binding Path=(err:Context.ViewModel).Commands.RunTest, RelativeSource={RelativeSource Self}}"
                    CommandParameter="{Binding}"
                    HorizontalAlignment="Right"
                    BorderBrush="Transparent"
                    BorderThickness="0"
                    Opacity="0"
                    Style="{DynamicResource FadeOutButton}">
                <Path Data="M 6 0 L 6 12 L 12 6 Z" Fill="Black" Margin="-4 0 0 0" />
            </Button>
        </Grid>
        <DataTemplate.Triggers>
            <DataTrigger Binding="{Binding TestState.Succeeded}" Value="True">
                <Setter TargetName="_icon" Property="Source" Value="/Resources/test_16_green.png" />
            </DataTrigger>
            <DataTrigger Binding="{Binding TestState.Succeeded}" Value="False">
                <Setter TargetName="_icon" Property="Source" Value="/Resources/test_16_red.png" />
            </DataTrigger>
            <DataTrigger Binding="{Binding TestState.Running}" Value="True">
                <Setter TargetName="_icon" Property="Source" Value="/Resources/test_16_running.png" />
            </DataTrigger>
            <DataTrigger Binding="{Binding TestState}" Value="{x:Null}">
                <Setter TargetName="_icon" Property="Source" Value="/Resources/test_16.png" />
            </DataTrigger>
        </DataTemplate.Triggers>
    </DataTemplate>

    <DataTemplate DataType="{x:Type domain:FaultyTestState}">
        <Grid Width="{err:PaddingBinding}">
            <Grid.RowDefinitions>
                <RowDefinition Height="30" />
                <RowDefinition Height="10" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>

            <Border Grid.Row="0" Grid.Column="0" Background="#FFBABA" BorderBrush="#D8000C" BorderThickness="1">
                <TextBlock Foreground="#D8000C" 
                           HorizontalAlignment="Center" VerticalAlignment="Center"
                           FontWeight="Bold"
                           >
                    Test Failed
                </TextBlock>
            </Border>

            <TextBlock TextWrapping="Wrap" Grid.Row="2" Grid.Column="0" Text="{Binding Message, Mode=OneWay}" /><commit_msg>Running test state<commit_after>﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"                    
                    xmlns:err="clr-namespace:ErrorCode"
                    xmlns:domain="clr-namespace:ErrorCode.Domain">

    <HierarchicalDataTemplate DataType="{x:Type domain:TestAssembly}" ItemsSource="{Binding Mode=OneWay}">
        <Grid ToolTip="{Binding Name, Mode=OneWay}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />    
                <ColumnDefinition Width="*" />    
            </Grid.ColumnDefinitions>
            
            <Image Grid.Column="0" Source="/Resources/library_16.png" />
            <TextBlock Grid.Column="1">
                <Run Text="{Binding Name, Mode=OneWay}" />
                <Run Text="[" FontSize="9" />
                <Run Text="{Binding Count, Mode=OneWay}" FontSize="9" />
                <Run Text="]" FontSize="9" />
            </TextBlock>

            <Button Grid.Column="0"
                    Width="16" Height="16"
                    ToolTip="Run Assembly Tests" 
                    Command="{Binding Path=(err:Context.ViewModel).Commands.RunAllAssemblyTests, RelativeSource={RelativeSource Self}}"
                    CommandParameter="{Binding}"
                    HorizontalAlignment="Right"
                    BorderBrush="Transparent"
                    BorderThickness="0"
                    Opacity="0"
                    Style="{DynamicResource FadeOutButton}">
                <Path Data="M 6 0 L 6 12 L 12 6 Z" Fill="Black" Margin="-4 0 0 0" />
            </Button>
        </Grid>
    </HierarchicalDataTemplate>

    <HierarchicalDataTemplate DataType="{x:Type domain:TestClass}" ItemsSource="{Binding Mode=OneWay}">
        <Grid ToolTip="{Binding Name, Mode=OneWay}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>

            <Image Grid.Column="0" Source="/Resources/class_16.png" />
            <TextBlock Grid.Column="1">
                <Run Text="{Binding Name, Mode=OneWay}" />
                <Run Text="[" FontSize="9" />
                <Run Text="{Binding Count, Mode=OneWay}" FontSize="9" />
                <Run Text="]" FontSize="9" />
            </TextBlock>

            <Button Grid.Column="0"
                    Width="16" Height="16"
                    ToolTip="Run Assembly Tests" 
                    Command="{Binding Path=(err:Context.ViewModel).Commands.RunAllClassTests, RelativeSource={RelativeSource Self}}"
                    CommandParameter="{Binding}"
                    HorizontalAlignment="Right"
                    BorderBrush="Transparent"
                    BorderThickness="0"
                    Opacity="0"
                    Style="{DynamicResource FadeOutButton}">
                <Path Data="M 6 0 L 6 12 L 12 6 Z" Fill="Black" Margin="-4 0 0 0" />
            </Button>
        </Grid>
    </HierarchicalDataTemplate>

    <DataTemplate DataType="{x:Type domain:Test}">
        <Grid ToolTip="{Binding Name, Mode=OneWay}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>

            <Image x:Name="_icon" Grid.Column="0" Source="/Resources/test_16.png" />
            <TextBlock Grid.Column="1" Text="{Binding Name, Mode=OneWay}" />

            <Button Grid.Column="0"
                    Width="16" Height="16"
                    ToolTip="Run Assembly Tests" 
                    Command="{Binding Path=(err:Context.ViewModel).Commands.RunTest, RelativeSource={RelativeSource Self}}"
                    CommandParameter="{Binding}"
                    HorizontalAlignment="Right"
                    BorderBrush="Transparent"
                    BorderThickness="0"
                    Opacity="0"
                    Style="{DynamicResource FadeOutButton}">
                <Path Data="M 6 0 L 6 12 L 12 6 Z" Fill="Black" Margin="-4 0 0 0" />
            </Button>
        </Grid>
        <DataTemplate.Triggers>
            <DataTrigger Binding="{Binding TestState.Succeeded}" Value="True">
                <Setter TargetName="_icon" Property="Source" Value="/Resources/test_16_green.png" />
            </DataTrigger>
            <DataTrigger Binding="{Binding TestState.Succeeded}" Value="False">
                <Setter TargetName="_icon" Property="Source" Value="/Resources/test_16_red.png" />
            </DataTrigger>
            <DataTrigger Binding="{Binding TestState.Running}" Value="True">
                <Setter TargetName="_icon" Property="Source" Value="/Resources/test_16_running.png" />
            </DataTrigger>
            <DataTrigger Binding="{Binding TestState}" Value="{x:Null}">
                <Setter TargetName="_icon" Property="Source" Value="/Resources/test_16.png" />
            </DataTrigger>
        </DataTemplate.Triggers>
    </DataTemplate>

    <DataTemplate DataType="{x:Type domain:RunningTestState}">
        <Grid Width="{err:PaddingBinding}">
            <Grid.RowDefinitions>
                <RowDefinition Height="30" />
                <RowDefinition Height="10" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>

            <Border Grid.Row="0" Grid.Column="0" Background="#BAD4FF" BorderBrush="#005ED8" BorderThickness="1">
                <TextBlock Foreground="#005ED8" 
                           HorizontalAlignment="Center" VerticalAlignment="Center"
                           FontWeight="Bold"
                           >
                    Test Currently Runnign
                </TextBlock>
            </Border>

            <TextBlock TextWrapping="Wrap" Grid.Row="2" Grid.Column="0" Text="{Binding Message, Mode=OneWay}" />
        </Grid>
    </DataTemplate>

    <DataTemplate DataType="{x:Type domain:FaultyTestState}">
        <Grid Width="{err:PaddingBinding}">
            <Grid.RowDefinitions>
                <RowDefinition Height="30" />
                <RowDefinition Height="10" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>

            <Border Grid.Row="0" Grid.Column="0" Background="#FFBABA" BorderBrush="#D8000C" BorderThickness="1">
                <TextBlock Foreground="#D8000C" 
                           HorizontalAlignment="Center" VerticalAlignment="Center"
                           FontWeight="Bold"
                           >
                    Test Failed
                </TextBlock>
            </Border>

            <TextBlock TextWrapping="Wrap" Grid.Row="2" Grid.Column="0" Text="{Binding Message, Mode=OneWay}" />
{'fraction_non_alphanumeric': 0.1312248156314149, 'fraction_numerical': 0.017790618109936897, 'mean_word_length': 1.8017039403620874, 'pattern_counts': {'":': 0, '<': 178, '<?xml version=': 0, '>': 178, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 8}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6409859', 'n_tokens_mistral': 3715, 'n_tokens_neox': 3196, 'n_words': 618}