Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding unit tests back into the solution.
- Loading branch information
1 parent
35b9950
commit 991386e
Showing
40 changed files
with
2,190 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
183 changes: 183 additions & 0 deletions
183
...med.Sample.Universal/Charmed.Sample.Universal.Tests/Charmed.Sample.Universal.Tests.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,183 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProductVersion>8.0.30703</ProductVersion> | ||
<SchemaVersion>2.0</SchemaVersion> | ||
<ProjectGuid>{7F2C3442-A0B6-4235-8ACA-113AB63480ED}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>Charmed.Sample.Tests</RootNamespace> | ||
<AssemblyName>Charmed.Sample.Universal.Tests</AssemblyName> | ||
<DefaultLanguage>en-US</DefaultLanguage> | ||
<TargetPlatformVersion>8.1</TargetPlatformVersion> | ||
<MinimumVisualStudioVersion>12</MinimumVisualStudioVersion> | ||
<FileAlignment>512</FileAlignment> | ||
<ProjectTypeGuids>{BC8A1FFA-BEE3-4634-8014-F334798102B3};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> | ||
<PackageCertificateKeyFile>Charmed.Sample.Universal.Tests_TemporaryKey.pfx</PackageCertificateKeyFile> | ||
<AppxBundle>Never</AppxBundle> | ||
<AllowCrossPlatformRetargeting>False</AllowCrossPlatformRetargeting> | ||
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir> | ||
<RestorePackages>true</RestorePackages> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE;NETFX_CORE</DefineConstants> | ||
<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;NETFX_CORE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'"> | ||
<DebugSymbols>true</DebugSymbols> | ||
<OutputPath>bin\ARM\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE;NETFX_CORE</DefineConstants> | ||
<NoWarn>;2008</NoWarn> | ||
<DebugType>full</DebugType> | ||
<PlatformTarget>ARM</PlatformTarget> | ||
<UseVSHostingProcess>false</UseVSHostingProcess> | ||
<ErrorReport>prompt</ErrorReport> | ||
<Prefer32Bit>true</Prefer32Bit> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM'"> | ||
<OutputPath>bin\ARM\Release\</OutputPath> | ||
<DefineConstants>TRACE;NETFX_CORE</DefineConstants> | ||
<Optimize>true</Optimize> | ||
<NoWarn>;2008</NoWarn> | ||
<DebugType>pdbonly</DebugType> | ||
<PlatformTarget>ARM</PlatformTarget> | ||
<UseVSHostingProcess>false</UseVSHostingProcess> | ||
<ErrorReport>prompt</ErrorReport> | ||
<Prefer32Bit>true</Prefer32Bit> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"> | ||
<DebugSymbols>true</DebugSymbols> | ||
<OutputPath>bin\x64\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE;NETFX_CORE</DefineConstants> | ||
<NoWarn>;2008</NoWarn> | ||
<DebugType>full</DebugType> | ||
<PlatformTarget>x64</PlatformTarget> | ||
<UseVSHostingProcess>false</UseVSHostingProcess> | ||
<ErrorReport>prompt</ErrorReport> | ||
<Prefer32Bit>true</Prefer32Bit> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'"> | ||
<OutputPath>bin\x64\Release\</OutputPath> | ||
<DefineConstants>TRACE;NETFX_CORE</DefineConstants> | ||
<Optimize>true</Optimize> | ||
<NoWarn>;2008</NoWarn> | ||
<DebugType>pdbonly</DebugType> | ||
<PlatformTarget>x64</PlatformTarget> | ||
<UseVSHostingProcess>false</UseVSHostingProcess> | ||
<ErrorReport>prompt</ErrorReport> | ||
<Prefer32Bit>true</Prefer32Bit> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'"> | ||
<DebugSymbols>true</DebugSymbols> | ||
<OutputPath>bin\x86\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE;NETFX_CORE</DefineConstants> | ||
<NoWarn>;2008</NoWarn> | ||
<DebugType>full</DebugType> | ||
<PlatformTarget>x86</PlatformTarget> | ||
<UseVSHostingProcess>false</UseVSHostingProcess> | ||
<ErrorReport>prompt</ErrorReport> | ||
<Prefer32Bit>true</Prefer32Bit> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'"> | ||
<OutputPath>bin\x86\Release\</OutputPath> | ||
<DefineConstants>TRACE;NETFX_CORE</DefineConstants> | ||
<Optimize>true</Optimize> | ||
<NoWarn>;2008</NoWarn> | ||
<DebugType>pdbonly</DebugType> | ||
<PlatformTarget>x86</PlatformTarget> | ||
<UseVSHostingProcess>false</UseVSHostingProcess> | ||
<ErrorReport>prompt</ErrorReport> | ||
<Prefer32Bit>true</Prefer32Bit> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<AppXPackage>True</AppXPackage> | ||
<AppxPackageIncludePrivateSymbols>true</AppxPackageIncludePrivateSymbols> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<!--A reference to the entire .Net Framework and Windows SDK are automatically included--> | ||
<SDKReference Include="MSTestFramework, Version=11.0" /> | ||
<SDKReference Include="TestPlatform, Version=11.0" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="Mocks\MessageBusMock.cs" /> | ||
<Compile Include="Mocks\MockHelper.cs" /> | ||
<Compile Include="Mocks\NavigatorMock.cs" /> | ||
<Compile Include="Mocks\RssFeedServiceMock.cs" /> | ||
<Compile Include="Mocks\SecondaryPinnerMock.cs" /> | ||
<Compile Include="Mocks\SerializerMock.cs" /> | ||
<Compile Include="Mocks\SettingsManagerMock.cs" /> | ||
<Compile Include="Mocks\SettingsMock.cs" /> | ||
<Compile Include="Mocks\ShareManagerMock.cs" /> | ||
<Compile Include="Mocks\StorageMock.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
<Compile Include="ViewModels\FeedItemViewModelTests.cs" /> | ||
<Compile Include="ViewModels\MainViewModelTests.cs" /> | ||
<Compile Include="ViewModels\SettingsViewModelTests.cs" /> | ||
<Compile Include="ViewModels\ShellViewModelTests.cs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<AppxManifest Include="Package.appxmanifest"> | ||
<SubType>Designer</SubType> | ||
</AppxManifest> | ||
<None Include="Charmed.Sample.Universal.Tests_TemporaryKey.pfx" /> | ||
<None Include="packages.config" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Content Include="Images\UnitTestLogo.scale-100.png"> | ||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
</Content> | ||
<Content Include="Images\UnitTestSmallLogo.scale-100.png"> | ||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
</Content> | ||
<Content Include="Images\UnitTestSplashScreen.scale-100.png"> | ||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
</Content> | ||
<Content Include="Images\UnitTestStoreLogo.scale-100.png"> | ||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
</Content> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\..\Charmed.Universal\Charmed.Universal.Windows\Charmed.Universal.Windows.csproj"> | ||
<Project>{46fe6513-8712-4090-950b-3bd225ba80fc}</Project> | ||
<Name>Charmed.Universal.Windows</Name> | ||
</ProjectReference> | ||
<ProjectReference Include="..\Charmed.Sample.Universal.Windows\Charmed.Sample.Universal.Windows.csproj"> | ||
<Project>{a5b33b78-139e-44c4-bd00-a383844d16b6}</Project> | ||
<Name>Charmed.Sample.Universal.Windows</Name> | ||
</ProjectReference> | ||
</ItemGroup> | ||
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' < '12.0' "> | ||
<VisualStudioVersion>12.0</VisualStudioVersion> | ||
</PropertyGroup> | ||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" /> | ||
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" /> | ||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> | ||
<PropertyGroup> | ||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> | ||
</PropertyGroup> | ||
<Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" /> | ||
</Target> | ||
<!-- 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> | ||
--> | ||
</Project> |
Binary file added
BIN
+2.45 KB
....Universal/Charmed.Sample.Universal.Tests/Charmed.Sample.Universal.Tests_TemporaryKey.pfx
Binary file not shown.
Binary file added
BIN
+5.65 KB
...mple.Universal/Charmed.Sample.Universal.Tests/Images/UnitTestLogo.scale-100.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+745 Bytes
...Universal/Charmed.Sample.Universal.Tests/Images/UnitTestSmallLogo.scale-100.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+9.16 KB
...versal/Charmed.Sample.Universal.Tests/Images/UnitTestSplashScreen.scale-100.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.96 KB
...Universal/Charmed.Sample.Universal.Tests/Images/UnitTestStoreLogo.scale-100.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions
35
Charmed.Sample.Universal/Charmed.Sample.Universal.Tests/Mocks/MessageBusMock.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using Charmed.Messaging; | ||
using System; | ||
|
||
namespace Charmed.Sample.Tests.Mocks | ||
{ | ||
public class MessageBusMock : IMessageBus | ||
{ | ||
public Action<object> SubscribeDelegate { get; set; } | ||
public void Subscribe<TMessage>(Action<TMessage> handler) | ||
{ | ||
if (SubscribeDelegate != null) | ||
{ | ||
SubscribeDelegate(handler); | ||
} | ||
} | ||
|
||
public Action<object> UnsubscribeDelegate { get; set; } | ||
public void Unsubscribe<TMessage>(Action<TMessage> handler) | ||
{ | ||
if (UnsubscribeDelegate != null) | ||
{ | ||
UnsubscribeDelegate(handler); | ||
} | ||
} | ||
|
||
public Action<object> PublishDelegate { get; set; } | ||
public void Publish<TMessage>(TMessage message) | ||
{ | ||
if (PublishDelegate != null) | ||
{ | ||
PublishDelegate(message); | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.