Skip to content

Commit

Permalink
Compile and unit tests working after creating components
Browse files Browse the repository at this point in the history
  • Loading branch information
Vivek Singh committed Feb 16, 2011
1 parent 7719d88 commit 63999d9
Show file tree
Hide file tree
Showing 159 changed files with 692 additions and 283 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,7 @@ tools/nant/WhiteCustomTasks/*.pdb
*.user
*.xap
Release/*
Output/*
Output
Components/Output/Components/*/*.dll
Components/Output/Components/*/*.pdb
Components/Core/Tests/UITests/App.config
2 changes: 1 addition & 1 deletion Components/Core/Core.sln
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Core", "Source\Core.csproj"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "White.Core.UnitTests", "Tests\Unit\White.Core.UnitTests.csproj", "{7C7960B2-905D-409A-8068-B010A35BA151}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UITests", "Tests\UITests\UITests.csproj", "{6D03B0F7-5FE2-45A0-996A-D0B45F6FB23B}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "White.Core.UITests", "Tests\UITests\White.Core.UITests.csproj", "{6D03B0F7-5FE2-45A0-996A-D0B45F6FB23B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
2 changes: 2 additions & 0 deletions Components/Core/Source/Application.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using Bricks.Core;
using White.Core.Configuration;
using White.Core.Factory;
using White.Core.Logging;
using White.Core.Sessions;
using White.Core.UIItems.Finders;
using White.Core.UIItems.WindowItems;
Expand Down Expand Up @@ -47,6 +48,7 @@ public static Application Launch(string executable)
/// <returns></returns>
public static Application Launch(ProcessStartInfo processStartInfo)
{
WhiteLogger.Instance.DebugFormat("Launching process: {0} in working directory: {1}", processStartInfo.FileName, processStartInfo.WorkingDirectory);
return Attach(Process.Start(processStartInfo));
}

Expand Down
1 change: 0 additions & 1 deletion Components/Core/Source/Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,6 @@
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="App.config.template" />
<None Include="AssemblyInfo.cs.template" />
<None Include="log4net.config">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
Expand Down
1 change: 0 additions & 1 deletion Components/Core/Source/UIItems/UIItem.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Reflection;
Expand Down
File renamed without changes.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<OutputPath>..\..\..\..\Output\Components\Core\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
Expand Down Expand Up @@ -106,7 +106,6 @@
<Compile Include="UIItems\ColorTest.cs" />
<Compile Include="UIItems\DateTimePickerTest.cs" />
<Compile Include="UIItems\ErrorProviderTest.cs" />
<Compile Include="UIItems\Finders\SearchCriteriaTest.cs" />
<Compile Include="UIItems\GroupBoxTest.cs" />
<Compile Include="UIItems\HorizontalThumbTest.cs" />
<Compile Include="UIItems\HotKeyTest.cs" />
Expand All @@ -131,7 +130,6 @@
<Compile Include="UIItems\MenuItems\MenuTest.cs" />
<Compile Include="UIItems\MenuItems\PopUpMenuTest.cs" />
<Compile Include="UIItems\PanelTest.cs" />
<Compile Include="UIItems\PlatformSpecificItemAttributeTest.cs" />
<Compile Include="UIItems\ProgressBarTest.cs" />
<Compile Include="UIItems\PropertyGridItems\PropertyGridTest.cs" />
<Compile Include="UIItems\RadioButtonTest.cs" />
Expand Down Expand Up @@ -187,6 +185,13 @@
<Name>Core</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="App.config.template" />
<None Include="log4net.config">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand Down
24 changes: 24 additions & 0 deletions Components/Core/Tests/UITests/log4net.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8" ?>
<log4net>
<root>
<level value="Debug" />
<appender-ref ref="Console" />
<appender-ref ref="White" />
</root>

<appender name="White" type="log4net.Appender.RollingFileAppender">
<file value="White.log" />
<appendToFile value="true" />
<maximumFileSize value="5MB" />
<maxSizeRollBackups value="10" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="[%d][%-5p] %m%n" />
</layout>
</appender>

<appender name="Console" type="log4net.Appender.ConsoleAppender">
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="[%d][%-5p] %m%n" />
</layout>
</appender>
</log4net>
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
using White.Core.UIItems.ListBoxItems;
using White.Core.UIItems.Scrolling;

namespace White.Core.UITests.UIItems
namespace White.Core.UnitTests.UIItems
{
[TestFixture, NormalCategory]
[TestFixture]
public class PlatformSpecificItemAttributeTest
{
[Test]
Expand Down
1 change: 1 addition & 0 deletions Components/Core/Tests/Unit/White.Core.UnitTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
<Compile Include="UIItems\Finders\IndexConditionTest.cs" />
<Compile Include="UIItems\Finders\SearchConditionFactoryTest.cs" />
<Compile Include="UIItems\Finders\SearchCriteriaTest.cs" />
<Compile Include="UIItems\PlatformSpecificItemAttributeTest.cs" />
</ItemGroup>
<ItemGroup>
<None Include="log4net.config">
Expand Down
4 changes: 2 additions & 2 deletions Components/CustomCommands/Framework/ButtonCommands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ public ButtonCommands(Button button)
this.button = button;
}

public double BorderBottomThickness
public virtual double BorderBottomThickness
{
get { return button.BorderThickness.Bottom; }
}

public Thickness BorderThickness
public virtual Thickness BorderThickness
{
get { return new Thickness(button.BorderThickness); }
}
Expand Down
6 changes: 1 addition & 5 deletions Components/CustomCommands/Framework/ComboBoxCommands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,11 @@ public ComboBoxCommands(ComboBox comboBox)
this.comboBox = comboBox;
}

public void Select(string itemText)
public virtual void Select(string itemText)
{
foreach (ComboBoxItem comboBoxItem in comboBox.Items)
{
if (Equals(comboBoxItem.Content, itemText))
{
comboBox.SelectedItem = comboBoxItem;
}
}
}
}
}
2 changes: 1 addition & 1 deletion Components/CustomCommands/Framework/ListBoxCommands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public ListBoxCommands(ListBox listBox)
this.listBox = listBox;
}

public int ItemCount
public virtual int ItemCount
{
get { return listBox.Items.Count; }
}
Expand Down
2 changes: 1 addition & 1 deletion Components/CustomCommands/Framework/TextBoxCommands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public TextBoxCommands(TextBox textBox)
this.textBox = textBox;
}

public void SelectText(string text)
public virtual void SelectText(string text)
{
string currentText = textBox.Text;
textBox.Select(currentText.IndexOf(text), text.Length);
Expand Down
8 changes: 4 additions & 4 deletions Components/CustomCommands/Framework/Thickness.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,22 @@ public Thickness(System.Windows.Thickness thickness)
top = thickness.Top;
}

public double Bottom
public virtual double Bottom
{
get { return bottom; }
}

public double Left
public virtual double Left
{
get { return left; }
}

public double Right
public virtual double Right
{
get { return right; }
}

public double Top
public virtual double Top
{
get { return top; }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using White.Core.CustomCommands;
using White.Core.UIItems;
using White.CustomCommands;
using White.NonCoreTests.WebBrowser;
using White.WebBrowser.UITests;

namespace White.CustomCommandsSilverlightTests
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using White.Core.CustomCommands;
using White.Core.UIItems.ListBoxItems;
using White.CustomCommands;
using White.NonCoreTests.WebBrowser;
using White.WebBrowser.UITests;

namespace White.CustomCommandsSilverlightTests
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\Output\Components\WebBrowser\White.WebBrowser.dll</HintPath>
</Reference>
<Reference Include="White.WebBrowser.Tests, Version=0.2.0.0, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="White.WebBrowser.UITests, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\Output\Components\WebBrowser\White.WebBrowser.Tests.dll</HintPath>
<HintPath>..\..\..\..\Output\Components\WebBrowser\White.WebBrowser.UITests.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<OutputPath>..\..\..\..\Output\Components\CustomCommands\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
using NUnit.Framework;
using White.Core;
using White.Core.CustomCommands;
using White.Core.UIItems;
using White.CustomCommands;
using White.Core.UnitTests.Testing;
using White.Core.UITests;
using White.Core.UITests.Testing;

namespace White.Core.UnitTests.CustomCommands
namespace White.CustomCommands.WPFTests
{
[TestFixture, WPFCategory]
public class CustomButtonCommandTest : ControlsActionTest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<ProjectGuid>{1F954832-7AE6-4C22-AE05-1354C3BEB1A5}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CustomCommands.WPFTests</RootNamespace>
<AssemblyName>CustomCommands.WPFTests</AssemblyName>
<RootNamespace>White.CustomCommands.WPFTests</RootNamespace>
<AssemblyName>White.CustomCommands.WPFTests</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
Expand Down Expand Up @@ -51,9 +51,9 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\Output\Components\Core\White.Core.dll</HintPath>
</Reference>
<Reference Include="White.Core.UnitTests, Version=0.2.0.0, Culture=neutral, PublicKeyToken=2672efbf3e161801, processorArchitecture=MSIL">
<Reference Include="White.Core.UITests, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\Output\Components\Core\White.Core.UnitTests.dll</HintPath>
<HintPath>..\..\..\..\Output\Components\Core\White.Core.UITests.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
using NUnit.Framework;
using White.Core;
using White.Core.CustomCommands;
using White.Core.UIItems.ListBoxItems;
using White.CustomCommands;
using White.Core.UnitTests.Testing;
using White.Core.UITests;
using White.Core.UITests.Testing;

namespace White.Core.UnitTests.CustomCommands
namespace White.CustomCommands.WPFTests
{
[TestFixture, WPFCategory]
public class CustomListBoxCommandTest : ControlsActionTest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
using NUnit.Framework;
using White.Core;
using White.Core.CustomCommands;
using White.Core.UIItems;
using White.CustomCommands;
using White.Core.UnitTests.Testing;
using White.Core.UITests;
using White.Core.UITests.Testing;

namespace White.Core.UnitTests.CustomCommands
namespace White.CustomCommands.WPFTests
{
[TestFixture, WPFCategory]
public class CustomTextBoxCommandTest : ControlsActionTest
Expand Down
2 changes: 1 addition & 1 deletion Components/CustomControls/CustomControls.sln
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CustomControlPeers", "Sourc
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CustomControlPeers.Silverlight", "Source\CustomControlPeers\CustomControlPeers.Silverlight.csproj", "{ED8E108C-4469-4D07-B60F-436178EB5E2C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "White.CustomControls.Tests", "Tests\White.CustomControls.Tests.csproj", "{9F509E89-5158-4095-B3D8-53FE00027363}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTests", "Tests\UnitTests.csproj", "{9F509E89-5158-4095-B3D8-53FE00027363}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
14 changes: 14 additions & 0 deletions Components/CustomControls/Tests/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="NUnit">
<section name="TestRunner" type="System.Configuration.NameValueSectionHandler"/>
</sectionGroup>
</configSections>
<NUnit>
<TestRunner>
<add key="ApartmentState" value="STA" />
<add key="ThreadPriority" value="Normal" />
</TestRunner>
</NUnit>
</configuration>
4 changes: 2 additions & 2 deletions Components/CustomControls/Tests/AssemblyBasedFactoryTest.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using System.Reflection;
using NUnit.Framework;
using White.CustomControls.Peers.Automation;
using White.CustomControls.Tests.Automation;
using White.CustomControls.UnitTests.Automation;

namespace White.CustomControls.Tests
namespace White.CustomControls.UnitTests
{
[TestFixture]
public class AssemblyBasedFactoryTest
Expand Down
Loading

0 comments on commit 63999d9

Please sign in to comment.