Skip to content
Permalink
Browse files

More work on test conversion

  • Loading branch information...
destanko destanko
destanko authored and destanko committed Aug 3, 2012
1 parent 871f92f commit ed09240e40c8741e0700832be5c8dacf2de6862f
@@ -146,6 +146,9 @@
<Compile Include="TestBase.cs" />
<Compile Include="UITest.cs" />
<Compile Include="UtilsTest.cs" />
<Content Include="Files\TestCase7\Test%3bFo%3blder\issue-10.txt" />
<Content Include="Files\TestCase7\Test%3bFolder\issue-10.txt" />
<Content Include="Files\TestCase7\Test,Folder\issue-10.txt" />
<Content Include="Files\TestCase8\test.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
@@ -169,6 +172,10 @@
<Project>{cbc7aec0-59ff-4050-b02d-adb15359ced4}</Project>
<Name>dnGREP.WPF</Name>
</ProjectReference>
<ProjectReference Include="..\NLog.XmlLayout\NLog.XmlLayout.csproj">
<Project>{1b364890-bbe6-4167-af65-fe1c01e8c419}</Project>
<Name>NLog.XmlLayout</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Content Include="Files\TestCase1\test-file-code.cs">
@@ -216,15 +223,6 @@
<Content Include="Files\TestCase6\test_file.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Files\TestCase7\Test%3bFo%3blder\issue-10.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Files\TestCase7\Test%3bFolder\issue-10.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Files\TestCase7\Test,Folder\issue-10.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
@@ -9,11 +9,10 @@

namespace Tests
{

public class UtilsTest : TestBase, IDisposable
{
string sourceFolder;
string destinationFolder;
static string sourceFolder;
static string destinationFolder;

public UtilsTest()
{
@@ -803,7 +802,7 @@ public void TestIsBinaryFile(string file, bool isBinary)
Assert.Equal<bool>(Utils.IsBinary(sourceFolder + file), isBinary);
}

public IEnumerable<object> TestGetPaths_Source
public static IEnumerable<object[]> TestGetPaths_Source
{
get {
yield return new object[] { sourceFolder + "\\TestCase5\\big-word-document.doc", 1 };
@@ -1,6 +1,6 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dnGREP.WPF", "dnGREP.WPF\dnGREP.WPF.csproj", "{CBC7AEC0-59FF-4050-B02D-ADB15359CED4}"
ProjectSection(ProjectDependencies) = postProject
{7317511F-A32C-44AE-9C87-1E4806E891FB} = {7317511F-A32C-44AE-9C87-1E4806E891FB}
@@ -32,6 +32,9 @@ Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "dnGREP.Setup", "dnGREP.Setu
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{18AF2E9E-B617-44BD-8A61-7BF687C8CAD1}"
ProjectSection(SolutionItems) = preProject
vs.testsettings = vs.testsettings
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -0,0 +1,20 @@
<UserControl x:Class="dnGREP.WPF.UserControls.SnippetPreview"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
<UserControl.Resources>
<Style x:Key="SourceCode" TargetType="TextBlock">
<Setter Property="FontFamily" Value="Consolas"/>
</Style>
</UserControl.Resources>
<StackPanel Orientation="Vertical">
<Label Content="{Binding SnippetInfo}"></Label>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding Lines}" Style="{StaticResource SourceCode}">12</TextBlock>
<TextBlock Text="{Binding Text}" Style="{StaticResource SourceCode}">Hello world</TextBlock>
</StackPanel>
</StackPanel>
</UserControl>
@@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace dnGREP.WPF.UserControls
{
/// <summary>
/// Interaction logic for SnippetPreview.xaml
/// </summary>
public partial class SnippetPreview : UserControl
{
public SnippetPreview()
{
InitializeComponent();
}
}
}
@@ -166,6 +166,9 @@
<Compile Include="UserControls\FolderSelectDropdown.xaml.cs">
<DependentUpon>FolderSelectDropdown.xaml</DependentUpon>
</Compile>
<Compile Include="UserControls\SnippetPreview.xaml.cs">
<DependentUpon>SnippetPreview.xaml</DependentUpon>
</Compile>
<Compile Include="ViewModels\CommandViewModel.cs" />
<Compile Include="ViewModels\OptionsViewModel.cs" />
<Compile Include="ViewModels\PreviewViewModel.cs" />
@@ -201,6 +204,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="UserControls\SnippetPreview.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Views\MainViewEx.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<TestSettings name="vs" id="50a13aa9-7b24-4b87-acf5-5e92ad30663d" xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010">
<Description>These are default test settings for a local test run.</Description>
<Deployment>
<DeploymentItem filename="Tests\Files\" />
</Deployment>
<Execution>
<TestTypeSpecific>
<UnitTestRunConfig testTypeId="13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b">
<AssemblyResolution>
<TestDirectory useLoadContext="true" />
</AssemblyResolution>
</UnitTestRunConfig>
<WebTestRunConfiguration testTypeId="4e7599fa-5ecb-43e9-a887-cd63cf72d207">
<Browser name="Internet Explorer 9.0" MaxConnections="6">
<Headers>
<Header name="User-Agent" value="Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)" />
<Header name="Accept" value="*/*" />
<Header name="Accept-Language" value="{{$IEAcceptLanguage}}" />
<Header name="Accept-Encoding" value="GZIP" />
</Headers>
</Browser>
</WebTestRunConfiguration>
</TestTypeSpecific>
<AgentRule name="LocalMachineDefaultRole">
</AgentRule>
</Execution>
</TestSettings>

0 comments on commit ed09240

Please sign in to comment.
You can’t perform that action at this time.