Permalink
Browse files

Added Silverlight, Windows Mobile and Windows Phone 7 platform test p…

…rojects.
  • Loading branch information...
1 parent f882b5f commit 6bcd850223b40962cda5e38f4692e99a55a279df @grumpydev committed Nov 26, 2010
Showing with 1,447 additions and 0 deletions.
  1. +20 −0 platformtests/Silverlight/SilverlightPlatformTests/SilverlightPlatformTests.sln
  2. +8 −0 platformtests/Silverlight/SilverlightPlatformTests/SilverlightPlatformTests/App.xaml
  3. +68 −0 platformtests/Silverlight/SilverlightPlatformTests/SilverlightPlatformTests/App.xaml.cs
  4. +16 −0 platformtests/Silverlight/SilverlightPlatformTests/SilverlightPlatformTests/MainPage.xaml
  5. +58 −0 platformtests/Silverlight/SilverlightPlatformTests/SilverlightPlatformTests/MainPage.xaml.cs
  6. +6 −0 ...ormtests/Silverlight/SilverlightPlatformTests/SilverlightPlatformTests/Properties/AppManifest.xml
  7. +35 −0 ...ormtests/Silverlight/SilverlightPlatformTests/SilverlightPlatformTests/Properties/AssemblyInfo.cs
  8. +117 −0 ...sts/Silverlight/SilverlightPlatformTests/SilverlightPlatformTests/SilverlightPlatformTests.csproj
  9. +22 −0 platformtests/WindowsMobile/SmartDeviceProject1.sln
  10. +74 −0 platformtests/WindowsMobile/SmartDeviceProject1/Form1.Designer.cs
  11. +47 −0 platformtests/WindowsMobile/SmartDeviceProject1/Form1.cs
  12. +129 −0 platformtests/WindowsMobile/SmartDeviceProject1/Form1.resx
  13. +12 −0 platformtests/WindowsMobile/SmartDeviceProject1/ITestInterface.cs
  14. +21 −0 platformtests/WindowsMobile/SmartDeviceProject1/Program.cs
  15. +36 −0 platformtests/WindowsMobile/SmartDeviceProject1/Properties/AssemblyInfo.cs
  16. +68 −0 platformtests/WindowsMobile/SmartDeviceProject1/Properties/Resources.Designer.cs
  17. +117 −0 platformtests/WindowsMobile/SmartDeviceProject1/Properties/Resources.resx
  18. +106 −0 platformtests/WindowsMobile/SmartDeviceProject1/SmartDeviceProject1.csproj
  19. +19 −0 platformtests/WindowsMobile/SmartDeviceProject1/TestClass.cs
  20. +22 −0 platformtests/WindowsPhone7PlatformTests/WindowsPhone7PlatformTests.sln
  21. +19 −0 platformtests/WindowsPhone7PlatformTests/WindowsPhone7PlatformTests/App.xaml
  22. +135 −0 platformtests/WindowsPhone7PlatformTests/WindowsPhone7PlatformTests/App.xaml.cs
  23. BIN platformtests/WindowsPhone7PlatformTests/WindowsPhone7PlatformTests/ApplicationIcon.png
  24. BIN platformtests/WindowsPhone7PlatformTests/WindowsPhone7PlatformTests/Background.png
  25. +50 −0 platformtests/WindowsPhone7PlatformTests/WindowsPhone7PlatformTests/MainPage.xaml
  26. +59 −0 platformtests/WindowsPhone7PlatformTests/WindowsPhone7PlatformTests/MainPage.xaml.cs
  27. +6 −0 platformtests/WindowsPhone7PlatformTests/WindowsPhone7PlatformTests/Properties/AppManifest.xml
  28. +35 −0 platformtests/WindowsPhone7PlatformTests/WindowsPhone7PlatformTests/Properties/AssemblyInfo.cs
  29. +32 −0 platformtests/WindowsPhone7PlatformTests/WindowsPhone7PlatformTests/Properties/WMAppManifest.xml
  30. BIN platformtests/WindowsPhone7PlatformTests/WindowsPhone7PlatformTests/SplashScreenImage.jpg
  31. +110 −0 ...formtests/WindowsPhone7PlatformTests/WindowsPhone7PlatformTests/WindowsPhone7PlatformTests.csproj
@@ -0,0 +1,20 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SilverlightPlatformTests", "SilverlightPlatformTests\SilverlightPlatformTests.csproj", "{AB6C7D5C-8285-4734-B9D9-F8FF24003456}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {AB6C7D5C-8285-4734-B9D9-F8FF24003456}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {AB6C7D5C-8285-4734-B9D9-F8FF24003456}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {AB6C7D5C-8285-4734-B9D9-F8FF24003456}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {AB6C7D5C-8285-4734-B9D9-F8FF24003456}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
@@ -0,0 +1,8 @@
+<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ x:Class="SilverlightPlatformTests.App"
+ >
+ <Application.Resources>
+
+ </Application.Resources>
+</Application>
@@ -0,0 +1,68 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+
+namespace SilverlightPlatformTests
+{
+ public partial class App : Application
+ {
+
+ public App()
+ {
+ this.Startup += this.Application_Startup;
+ this.Exit += this.Application_Exit;
+ this.UnhandledException += this.Application_UnhandledException;
+
+ InitializeComponent();
+ }
+
+ private void Application_Startup(object sender, StartupEventArgs e)
+ {
+ this.RootVisual = new MainPage();
+ }
+
+ private void Application_Exit(object sender, EventArgs e)
+ {
+
+ }
+
+ private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
+ {
+ // If the app is running outside of the debugger then report the exception using
+ // the browser's exception mechanism. On IE this will display it a yellow alert
+ // icon in the status bar and Firefox will display a script error.
+ if (!System.Diagnostics.Debugger.IsAttached)
+ {
+
+ // NOTE: This will allow the application to continue running after an exception has been thrown
+ // but not handled.
+ // For production applications this error handling should be replaced with something that will
+ // report the error to the website and stop the application.
+ e.Handled = true;
+ Deployment.Current.Dispatcher.BeginInvoke(delegate { ReportErrorToDOM(e); });
+ }
+ }
+
+ private void ReportErrorToDOM(ApplicationUnhandledExceptionEventArgs e)
+ {
+ try
+ {
+ string errorMsg = e.ExceptionObject.Message + e.ExceptionObject.StackTrace;
+ errorMsg = errorMsg.Replace('"', '\'').Replace("\r\n", @"\n");
+
+ System.Windows.Browser.HtmlPage.Window.Eval("throw new Error(\"Unhandled Error in Silverlight Application " + errorMsg + "\");");
+ }
+ catch (Exception)
+ {
+ }
+ }
+ }
+}
@@ -0,0 +1,16 @@
+<UserControl x:Class="SilverlightPlatformTests.MainPage"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ mc:Ignorable="d"
+ d:DesignHeight="300" d:DesignWidth="400">
+
+ <Grid x:Name="LayoutRoot" Background="White">
+ <StackPanel>
+ <Button x:Name="GoButton" Click="GoButton_Click">Go</Button>
+ <ListBox x:Name="Results"/>
+ </StackPanel>
+
+ </Grid>
+</UserControl>
@@ -0,0 +1,58 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+using TinyIoC.Tests.PlatformTestSuite;
+
+namespace SilverlightPlatformTests
+{
+ public class ListLogger : ILogger
+ {
+ public List<String> LogEntries { get; private set; }
+
+ public ListLogger()
+ {
+ LogEntries = new List<string>();
+ }
+
+ #region ILogger Members
+
+ public void WriteLine(string text)
+ {
+ LogEntries.Add(text);
+ }
+
+ #endregion
+ }
+
+ public partial class MainPage : UserControl
+ {
+ public MainPage()
+ {
+ InitializeComponent();
+ }
+
+ private void GoButton_Click(object sender, RoutedEventArgs e)
+ {
+ var logger = new ListLogger();
+ var tests = new PlatformTests(logger);
+ int testsRun;
+ int testsPassed;
+ int testsFailed;
+ tests.RunTests(out testsRun, out testsPassed, out testsFailed);
+ Results.Items.Clear();
+ foreach (var item in logger.LogEntries)
+ {
+ Results.Items.Add(item);
+ }
+ MessageBox.Show(String.Format("{0} tests run. {1} passed, {2} failed.", testsRun, testsPassed, testsFailed));
+ }
+ }
+}
@@ -0,0 +1,6 @@
+<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+>
+ <Deployment.Parts>
+ </Deployment.Parts>
+</Deployment>
@@ -0,0 +1,35 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("SilverlightPlatformTests")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyProduct("SilverlightPlatformTests")]
+[assembly: AssemblyCopyright("Copyright © Microsoft 2010")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("a4223f05-838e-46b4-bf7d-21a5f07cd761")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{AB6C7D5C-8285-4734-B9D9-F8FF24003456}</ProjectGuid>
+ <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>SilverlightPlatformTests</RootNamespace>
+ <AssemblyName>SilverlightPlatformTests</AssemblyName>
+ <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
+ <SilverlightApplication>true</SilverlightApplication>
+ <SupportedCultures>
+ </SupportedCultures>
+ <XapOutputs>true</XapOutputs>
+ <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
+ <XapFilename>SilverlightPlatformTests.xap</XapFilename>
+ <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
+ <SilverlightAppEntry>SilverlightPlatformTests.App</SilverlightAppEntry>
+ <TestPageFileName>SilverlightPlatformTestsTestPage.html</TestPageFileName>
+ <CreateTestPage>true</CreateTestPage>
+ <ValidateXaml>true</ValidateXaml>
+ <EnableOutOfBrowser>false</EnableOutOfBrowser>
+ <OutOfBrowserSettingsFile>Properties\OutOfBrowserSettings.xml</OutOfBrowserSettingsFile>
+ <UsePlatformExtensions>false</UsePlatformExtensions>
+ <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
+ <LinkedServerProject>
+ </LinkedServerProject>
+ </PropertyGroup>
+ <!-- This property group is only here to support building this project using the
+ MSBuild 3.5 toolset. In order to work correctly with this older toolset, it needs
+ to set the TargetFrameworkVersion to v3.5 -->
+ <PropertyGroup Condition="'$(MSBuildToolsVersion)' == '3.5'">
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>Bin\Debug</OutputPath>
+ <DefineConstants>DEBUG;TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>Bin\Release</OutputPath>
+ <DefineConstants>TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="mscorlib" />
+ <Reference Include="System.Windows" />
+ <Reference Include="system" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Net" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Windows.Browser" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="..\..\..\..\src\TinyIoC.Tests\PlatformTestSuite\PlatformTests.cs">
+ <Link>PlatformTests.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\..\src\TinyIoC\TinyIoC.cs">
+ <Link>TinyIoC.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\..\src\TinyIoC\TinyMessenger.cs">
+ <Link>TinyMessenger.cs</Link>
+ </Compile>
+ <Compile Include="App.xaml.cs">
+ <DependentUpon>App.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="MainPage.xaml.cs">
+ <DependentUpon>MainPage.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ApplicationDefinition Include="App.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </ApplicationDefinition>
+ <Page Include="MainPage.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Properties\AppManifest.xml" />
+ </ItemGroup>
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.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.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
+ <SilverlightProjectProperties />
+ </FlavorProperties>
+ </VisualStudio>
+ </ProjectExtensions>
+</Project>
@@ -0,0 +1,22 @@
+
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SmartDeviceProject1", "SmartDeviceProject1\SmartDeviceProject1.csproj", "{0174DBF7-9449-4379-B169-AAD3060A531D}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {0174DBF7-9449-4379-B169-AAD3060A531D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0174DBF7-9449-4379-B169-AAD3060A531D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0174DBF7-9449-4379-B169-AAD3060A531D}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
+ {0174DBF7-9449-4379-B169-AAD3060A531D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {0174DBF7-9449-4379-B169-AAD3060A531D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {0174DBF7-9449-4379-B169-AAD3060A531D}.Release|Any CPU.Deploy.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
Oops, something went wrong.

0 comments on commit 6bcd850

Please sign in to comment.