Browse Source

Use dotnet test for layout and controls tests

Nikita Tsukanov 8 years ago
parent
commit
886a65beaa

+ 4 - 3
build.cake

@@ -159,12 +159,11 @@ Task("Build")
 
 void RunCoreTest(string dir, Parameters parameters)
 {
+    Information("Running tests from " + dir);
     DotNetCoreRestore(dir);
-    var frameworks = new List<string>();;
+    var frameworks = new List<string>(){"netcoreapp1.1"};
     if(parameters.IsRunningOnWindows)
         frameworks.Add("net461");
-    else
-        frameworks.Add("netcoreapp1.1");
     foreach(var fw in frameworks)
     {
         Information("Running for " + fw);
@@ -178,6 +177,8 @@ Task("Run-Net-Core-Unit-Tests")
     .IsDependentOn("Clean")
     .Does(() => {
         RunCoreTest("./tests/Avalonia.Base.UnitTests", parameters);
+        RunCoreTest("./tests/Avalonia.Controls.UnitTests", parameters);
+        RunCoreTest("./tests/Avalonia.Layout.UnitTests", parameters);
     });
 
 Task("Run-Unit-Tests")

+ 1 - 26
tests/Avalonia.Base.UnitTests/Avalonia.Base.UnitTests.csproj

@@ -4,25 +4,6 @@
     <ProjectGuid>{2905FF23-53FB-45E6-AA49-6AF47A172056}</ProjectGuid>
   </PropertyGroup>
   <Import Project="$(MSBuildThisFileDirectory)..\coretests.props" />
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <DebugSymbols>true</DebugSymbols>
-    <DebugType>full</DebugType>
-    <Optimize>false</Optimize>
-    <OutputPath>bin\Debug\</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-    <DebugType>pdbonly</DebugType>
-    <Optimize>true</Optimize>
-    <OutputPath>bin\Release\</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
-  </PropertyGroup>
   <ItemGroup>
     <Compile Include="AvaloniaObjectTests_DataValidation.cs" />
     <Compile Include="Collections\CollectionChangedTracker.cs" />
@@ -57,11 +38,5 @@
       <Name>Avalonia.UnitTests</Name>
     </ProjectReference>
   </ItemGroup>
-  <!-- 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>

+ 0 - 2
tests/Avalonia.Benchmarks/Avalonia.Benchmarks.csproj

@@ -108,8 +108,6 @@
   </Target>
   -->
   <ItemGroup>
-    <PackageReference Include="AutoFixture" Version="3.40.0" />
-    <PackageReference Include="AutoFixture.AutoMoq" Version="3.40.0" />
     <PackageReference Include="BenchmarkDotNet" Version="0.9.2" />
     <PackageReference Include="Moq" Version="4.7.1" />
   </ItemGroup>

+ 9 - 53
tests/Avalonia.Controls.UnitTests/Avalonia.Controls.UnitTests.csproj

@@ -1,35 +1,9 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProjectGuid>{5CCB5571-7C30-4E7D-967D-0E2158EBD91F}</ProjectGuid>
-    <OutputType>Library</OutputType>
-    <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
-    <FileAlignment>512</FileAlignment>
-    <TargetFrameworkProfile />
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <DebugSymbols>true</DebugSymbols>
-    <DebugType>full</DebugType>
-    <Optimize>false</Optimize>
-    <OutputPath>bin\Debug\</OutputPath>
-    <DefineConstants>DEBUG;TRACE</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</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <ItemGroup>
-    <Reference Include="System" />
-    <Reference Include="WindowsBase" />
-  </ItemGroup>
+<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
+    <PropertyGroup>
+        <TargetFrameworks>net461;netcoreapp1.1</TargetFrameworks>
+        <ProjectGuid>{5CCB5571-7C30-4E7D-967D-0E2158EBD91F}</ProjectGuid>
+    </PropertyGroup>
+    <Import Project="$(MSBuildThisFileDirectory)..\coretests.props" />
   <ItemGroup>
     <Compile Include="AppBuilderTests.cs" />
     <Compile Include="CanvasTests.cs" />
@@ -92,10 +66,6 @@
     <Compile Include="WrapPanelTests.cs" />
   </ItemGroup>
   <ItemGroup>
-    <ProjectReference Include="..\..\src\Avalonia.DotNetFrameworkRuntime\Avalonia.DotNetFrameworkRuntime.csproj">
-      <Project>{4a1abb09-9047-4bd5-a4ad-a055e52c5ee0}</Project>
-      <Name>Avalonia.DotNetFrameworkRuntime</Name>
-    </ProjectReference>
     <ProjectReference Include="..\..\src\Markup\Avalonia.Markup.Xaml\Avalonia.Markup.Xaml.csproj">
       <Project>{3e53a01a-b331-47f3-b828-4a5717e77a24}</Project>
       <Name>Avalonia.Markup.Xaml</Name>
@@ -142,23 +112,6 @@
     </ProjectReference>
   </ItemGroup>
   <ItemGroup>
-    <None Include="app.config" />
-    <None Include="packages.config" />
-  </ItemGroup>
-  <ItemGroup>
-    <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
-  </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.
-  <Target Name="BeforeBuild">
-  </Target>
-  <Target Name="AfterBuild">
-  </Target>
-  -->
-  <ItemGroup>
-    <PackageReference Include="AutoFixture" Version="3.40.0" />
-    <PackageReference Include="AutoFixture.AutoMoq" Version="3.40.0" />
     <PackageReference Include="Moq" Version="4.7.1" />
     <PackageReference Include="System.Reactive.Core" Version="3.0.0" />
     <PackageReference Include="System.Reactive.Interfaces" Version="3.0.0" />
@@ -172,5 +125,8 @@
     <PackageReference Include="xunit.extensibility.execution" Version="2.2.0" />
     <PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
   </ItemGroup>
+  <ItemGroup>
+    <Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
+  </ItemGroup>
   <Import Project="$(MSBuildThisFileDirectory)..\..\src\Shared\nuget.workaround.targets" />
 </Project>

+ 0 - 2
tests/Avalonia.Controls.UnitTests/TopLevelTests.cs

@@ -14,8 +14,6 @@ using Avalonia.Platform;
 using Avalonia.Rendering;
 using Avalonia.Styling;
 using Avalonia.UnitTests;
-using Ploeh.AutoFixture;
-using Ploeh.AutoFixture.AutoMoq;
 using Xunit;
 
 namespace Avalonia.Controls.UnitTests

+ 0 - 2
tests/Avalonia.Controls.UnitTests/WindowBaseTests.cs

@@ -14,8 +14,6 @@ using Avalonia.Platform;
 using Avalonia.Rendering;
 using Avalonia.Styling;
 using Avalonia.UnitTests;
-using Ploeh.AutoFixture;
-using Ploeh.AutoFixture.AutoMoq;
 using Xunit;
 
 namespace Avalonia.Controls.UnitTests

+ 71 - 142
tests/Avalonia.Layout.UnitTests/Avalonia.Layout.UnitTests.csproj

@@ -1,143 +1,72 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProjectGuid>{DB070A10-BF39-4752-8456-86E9D5928478}</ProjectGuid>
-    <OutputType>Library</OutputType>
-    <AppDesignerFolder>Properties</AppDesignerFolder>
-    <RootNamespace>Avalonia.Layout.UnitTests</RootNamespace>
-    <AssemblyName>Avalonia.Layout.UnitTests</AssemblyName>
-    <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
-    <FileAlignment>512</FileAlignment>
-    <TargetFrameworkProfile />
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <DebugSymbols>true</DebugSymbols>
-    <DebugType>full</DebugType>
-    <Optimize>false</Optimize>
-    <OutputPath>bin\Debug\</OutputPath>
-    <DefineConstants>DEBUG;TRACE</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</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <ItemGroup>
-    <Compile Include="FullLayoutTests.cs" />
-    <Compile Include="LayoutManagerTests.cs" />
-    <Compile Include="ArrangeTests.cs" />
-    <Compile Include="MeasureTests.cs" />
-    <Compile Include="Properties\AssemblyInfo.cs" />
-    <Compile Include="TestLayoutRoot.cs" />
-  </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="..\..\src\Avalonia.Animation\Avalonia.Animation.csproj">
-      <Project>{D211E587-D8BC-45B9-95A4-F297C8FA5200}</Project>
-      <Name>Avalonia.Animation</Name>
-    </ProjectReference>
-    <ProjectReference Include="..\..\src\Avalonia.Base\Avalonia.Base.csproj">
-      <Project>{B09B78D8-9B26-48B0-9149-D64A2F120F3F}</Project>
-      <Name>Avalonia.Base</Name>
-    </ProjectReference>
-    <ProjectReference Include="..\..\src\Avalonia.Controls\Avalonia.Controls.csproj">
-      <Project>{D2221C82-4A25-4583-9B43-D791E3F6820C}</Project>
-      <Name>Avalonia.Controls</Name>
-    </ProjectReference>
-    <ProjectReference Include="..\..\src\Avalonia.Diagnostics\Avalonia.Diagnostics.csproj">
-      <Project>{7062AE20-5DCC-4442-9645-8195BDECE63E}</Project>
-      <Name>Avalonia.Diagnostics</Name>
-    </ProjectReference>
-    <ProjectReference Include="..\..\src\Avalonia.DotNetFrameworkRuntime\Avalonia.DotNetFrameworkRuntime.csproj">
-      <Project>{4a1abb09-9047-4bd5-a4ad-a055e52c5ee0}</Project>
-      <Name>Avalonia.DotNetFrameworkRuntime</Name>
-    </ProjectReference>
-    <ProjectReference Include="..\..\src\Avalonia.Input\Avalonia.Input.csproj">
-      <Project>{62024B2D-53EB-4638-B26B-85EEAA54866E}</Project>
-      <Name>Avalonia.Input</Name>
-    </ProjectReference>
-    <ProjectReference Include="..\..\src\Avalonia.Interactivity\Avalonia.Interactivity.csproj">
-      <Project>{6B0ED19D-A08B-461C-A9D9-A9EE40B0C06B}</Project>
-      <Name>Avalonia.Interactivity</Name>
-    </ProjectReference>
-    <ProjectReference Include="..\..\src\Avalonia.Layout\Avalonia.Layout.csproj">
-      <Project>{42472427-4774-4C81-8AFF-9F27B8E31721}</Project>
-      <Name>Avalonia.Layout</Name>
-    </ProjectReference>
-    <ProjectReference Include="..\..\src\Avalonia.ReactiveUI\Avalonia.ReactiveUI.csproj">
-      <Project>{6417b24e-49c2-4985-8db2-3ab9d898ec91}</Project>
-      <Name>Avalonia.ReactiveUI</Name>
-    </ProjectReference>
-    <ProjectReference Include="..\..\src\Avalonia.Visuals\Avalonia.Visuals.csproj">
-      <Project>{EB582467-6ABB-43A1-B052-E981BA910E3A}</Project>
-      <Name>Avalonia.Visuals</Name>
-    </ProjectReference>
-    <ProjectReference Include="..\..\src\Avalonia.Styling\Avalonia.Styling.csproj">
-      <Project>{F1BAA01A-F176-4C6A-B39D-5B40BB1B148F}</Project>
-      <Name>Avalonia.Styling</Name>
-    </ProjectReference>
-    <ProjectReference Include="..\..\src\Avalonia.Themes.Default\Avalonia.Themes.Default.csproj">
-      <Project>{3E10A5FA-E8DA-48B1-AD44-6A5B6CB7750F}</Project>
-      <Name>Avalonia.Themes.Default</Name>
-    </ProjectReference>
-    <ProjectReference Include="..\Avalonia.Controls.UnitTests\Avalonia.Controls.UnitTests.csproj">
-      <Project>{5ccb5571-7c30-4e7d-967d-0e2158ebd91f}</Project>
-      <Name>Avalonia.Controls.UnitTests</Name>
-    </ProjectReference>
-  </ItemGroup>
-  <ItemGroup>
-    <None Include="app.config" />
-    <None Include="packages.config" />
-  </ItemGroup>
-  <ItemGroup>
-    <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
-  </ItemGroup>
-  <Choose>
-    <When Condition="'$(VisualStudioVersion)' == '10.0' And '$(IsCodedUITest)' == 'True'">
-      <ItemGroup>
-        <Reference Include="Microsoft.VisualStudio.QualityTools.CodedUITestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
-          <Private>False</Private>
-        </Reference>
-        <Reference Include="Microsoft.VisualStudio.TestTools.UITest.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
-          <Private>False</Private>
-        </Reference>
-        <Reference Include="Microsoft.VisualStudio.TestTools.UITest.Extension, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
-          <Private>False</Private>
-        </Reference>
-        <Reference Include="Microsoft.VisualStudio.TestTools.UITesting, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
-          <Private>False</Private>
-        </Reference>
-      </ItemGroup>
-    </When>
-  </Choose>
-  <Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
-  <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.
-  <Target Name="BeforeBuild">
-  </Target>
-  <Target Name="AfterBuild">
-  </Target>
-  -->
-  <ItemGroup>
-    <PackageReference Include="AutoFixture" Version="3.40.0" />
-    <PackageReference Include="AutoFixture.AutoMoq" Version="3.40.0" />
-    <PackageReference Include="Moq" Version="4.7.1" />
-    <PackageReference Include="System.Reactive.Core" Version="3.0.0" />
-    <PackageReference Include="System.Reactive.Interfaces" Version="3.0.0" />
-    <PackageReference Include="xunit" Version="2.2.0" />
-    <PackageReference Include="xunit.abstractions" Version="2.0.1" />
-    <PackageReference Include="xunit.assert" Version="2.2.0" />
-    <PackageReference Include="xunit.core" Version="2.2.0" />
-    <PackageReference Include="xunit.extensibility.core" Version="2.2.0" />
-    <PackageReference Include="xunit.extensibility.execution" Version="2.2.0" />
-    <PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
-  </ItemGroup>
-  <Import Project="$(MSBuildThisFileDirectory)..\..\src\Shared\nuget.workaround.targets" />
+<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
+    <PropertyGroup>
+        <TargetFrameworks>net461;netcoreapp1.1</TargetFrameworks>
+        <ProjectGuid>{DB070A10-BF39-4752-8456-86E9D5928478}</ProjectGuid>
+    </PropertyGroup>
+    <Import Project="$(MSBuildThisFileDirectory)..\coretests.props" />
+    <ItemGroup>
+        <Compile Include="FullLayoutTests.cs" />
+        <Compile Include="LayoutManagerTests.cs" />
+        <Compile Include="ArrangeTests.cs" />
+        <Compile Include="MeasureTests.cs" />
+        <Compile Include="Properties\AssemblyInfo.cs" />
+        <Compile Include="TestLayoutRoot.cs" />
+    </ItemGroup>
+    <ItemGroup>
+        <ProjectReference Include="..\..\src\Avalonia.Animation\Avalonia.Animation.csproj">
+            <Project>{D211E587-D8BC-45B9-95A4-F297C8FA5200}</Project>
+            <Name>Avalonia.Animation</Name>
+        </ProjectReference>
+        <ProjectReference Include="..\..\src\Avalonia.Base\Avalonia.Base.csproj">
+            <Project>{B09B78D8-9B26-48B0-9149-D64A2F120F3F}</Project>
+            <Name>Avalonia.Base</Name>
+        </ProjectReference>
+        <ProjectReference Include="..\..\src\Avalonia.Controls\Avalonia.Controls.csproj">
+            <Project>{D2221C82-4A25-4583-9B43-D791E3F6820C}</Project>
+            <Name>Avalonia.Controls</Name>
+        </ProjectReference>
+        <ProjectReference Include="..\..\src\Avalonia.Diagnostics\Avalonia.Diagnostics.csproj">
+            <Project>{7062AE20-5DCC-4442-9645-8195BDECE63E}</Project>
+            <Name>Avalonia.Diagnostics</Name>
+        </ProjectReference>
+        <ProjectReference Include="..\..\src\Avalonia.Input\Avalonia.Input.csproj">
+            <Project>{62024B2D-53EB-4638-B26B-85EEAA54866E}</Project>
+            <Name>Avalonia.Input</Name>
+        </ProjectReference>
+        <ProjectReference Include="..\..\src\Avalonia.Interactivity\Avalonia.Interactivity.csproj">
+            <Project>{6B0ED19D-A08B-461C-A9D9-A9EE40B0C06B}</Project>
+            <Name>Avalonia.Interactivity</Name>
+        </ProjectReference>
+        <ProjectReference Include="..\..\src\Avalonia.Layout\Avalonia.Layout.csproj">
+            <Project>{42472427-4774-4C81-8AFF-9F27B8E31721}</Project>
+            <Name>Avalonia.Layout</Name>
+        </ProjectReference>
+        <ProjectReference Include="..\..\src\Avalonia.ReactiveUI\Avalonia.ReactiveUI.csproj">
+            <Project>{6417b24e-49c2-4985-8db2-3ab9d898ec91}</Project>
+            <Name>Avalonia.ReactiveUI</Name>
+        </ProjectReference>
+        <ProjectReference Include="..\..\src\Avalonia.Visuals\Avalonia.Visuals.csproj">
+            <Project>{EB582467-6ABB-43A1-B052-E981BA910E3A}</Project>
+            <Name>Avalonia.Visuals</Name>
+        </ProjectReference>
+        <ProjectReference Include="..\..\src\Avalonia.Styling\Avalonia.Styling.csproj">
+            <Project>{F1BAA01A-F176-4C6A-B39D-5B40BB1B148F}</Project>
+            <Name>Avalonia.Styling</Name>
+        </ProjectReference>
+        <ProjectReference Include="..\..\src\Avalonia.Themes.Default\Avalonia.Themes.Default.csproj">
+            <Project>{3E10A5FA-E8DA-48B1-AD44-6A5B6CB7750F}</Project>
+            <Name>Avalonia.Themes.Default</Name>
+        </ProjectReference>
+        <ProjectReference Include="..\Avalonia.UnitTests\Avalonia.UnitTests.csproj">
+            <Project>{88060192-33d5-4932-b0f9-8bd2763e857d}</Project>
+            <Name>Avalonia.UnitTests</Name>
+        </ProjectReference>
+        <ProjectReference Include="..\Avalonia.Controls.UnitTests\Avalonia.Controls.UnitTests.csproj">
+            <Project>{5CCB5571-7C30-4E7D-967D-0E2158EBD91F}</Project>
+            <Name>Avalonia.UnitTests</Name>
+        </ProjectReference>
+    </ItemGroup>
+    <ItemGroup>
+      <Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
+    </ItemGroup>
 </Project>

+ 40 - 10
tests/Avalonia.Layout.UnitTests/FullLayoutTests.cs

@@ -9,8 +9,6 @@ using Avalonia.Controls;
 using Avalonia.Controls.Presenters;
 using Avalonia.Controls.Primitives;
 using Avalonia.Controls.Templates;
-using Avalonia.Controls.UnitTests;
-using Avalonia.Controls.UnitTests.Primitives;
 using Avalonia.Diagnostics;
 using Avalonia.Input;
 using Avalonia.Platform;
@@ -19,9 +17,10 @@ using Avalonia.Shared.PlatformSupport;
 using Avalonia.Styling;
 using Avalonia.Themes.Default;
 using Avalonia.VisualTree;
-using Ploeh.AutoFixture;
-using Ploeh.AutoFixture.AutoMoq;
 using Xunit;
+using Avalonia.Media;
+using System;
+using System.Collections.Generic;
 
 namespace Avalonia.Layout.UnitTests
 {
@@ -130,13 +129,44 @@ namespace Avalonia.Layout.UnitTests
             return v.Bounds.Position;
         }
 
-        private void RegisterServices()
+        class FormattedTextMock : IFormattedTextImpl
         {
-            var fixture = new Fixture().Customize(new AutoMoqCustomization());
+            public FormattedTextMock(string text)
+            {
+                Text = text;
+            }
+
+            public Size Constraint { get; set; }
+
+            public string Text { get; }
+
+            public void Dispose()
+            {
+            }
+
+            public IEnumerable<FormattedTextLine> GetLines() => new FormattedTextLine[0];
+
+            public TextHitTestResult HitTestPoint(Point point) => new TextHitTestResult();
 
-            var formattedText = fixture.Create<IFormattedTextImpl>();
+            public Rect HitTestTextPosition(int index) => new Rect();
+
+            public IEnumerable<Rect> HitTestTextRange(int index, int length) => new Rect[0];
+
+            public Size Measure() => Constraint;
+
+            public void SetForegroundBrush(IBrush brush, int startIndex, int length)
+            {
+            }
+        }
+
+        private void RegisterServices()
+        {
             var globalStyles = new Mock<IGlobalStyles>();
-            var renderInterface = fixture.Create<IPlatformRenderInterface>();
+            var renderInterface = new Mock<IPlatformRenderInterface>();
+            renderInterface.Setup(x => x.CreateFormattedText(It.IsAny<string>(), It.IsAny<string>(), It.IsAny<double>(), It.IsAny<FontStyle>(),
+                It.IsAny<TextAlignment>(), It.IsAny<FontWeight>(), It.IsAny<TextWrapping>()))
+                .Returns(new FormattedTextMock("TEST"));
+                
             var windowImpl = new Mock<IWindowImpl>();
 
             Size clientSize = default(Size);
@@ -152,9 +182,9 @@ namespace Avalonia.Layout.UnitTests
                 .Bind<IGlobalStyles>().ToConstant(globalStyles.Object)
                 .Bind<ILayoutManager>().ToConstant(new LayoutManager())
                 .Bind<IRuntimePlatform>().ToConstant(new AppBuilder().RuntimePlatform)
-                .Bind<IPlatformRenderInterface>().ToConstant(renderInterface)
+                .Bind<IPlatformRenderInterface>().ToConstant(renderInterface.Object)
                 .Bind<IStyler>().ToConstant(new Styler())
-                .Bind<IWindowingPlatform>().ToConstant(new WindowingPlatformMock(() => windowImpl.Object));
+                .Bind<IWindowingPlatform>().ToConstant(new Avalonia.Controls.UnitTests.WindowingPlatformMock(() => windowImpl.Object));
 
             var theme = new DefaultTheme();
             globalStyles.Setup(x => x.Styles).Returns(theme);

+ 0 - 2
tests/Avalonia.LeakTests/Avalonia.LeakTests.csproj

@@ -127,8 +127,6 @@
   </Target>
   -->
   <ItemGroup>
-    <PackageReference Include="AutoFixture" Version="3.40.0" />
-    <PackageReference Include="AutoFixture.AutoMoq" Version="3.40.0" />
     <PackageReference Include="JetBrains.dotMemoryUnit" Version="2.1.20150828.125449" />
     <PackageReference Include="Moq" Version="4.7.1" />
     <PackageReference Include="System.Reactive" Version="3.0.0" />

+ 22 - 4
tests/coretests.props

@@ -1,10 +1,28 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
     <PropertyGroup>
-
-    <EnableDefaultCompileItems>False</EnableDefaultCompileItems>
-    <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
-    <GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
+        <EnableDefaultCompileItems>False</EnableDefaultCompileItems>
+        <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
+        <GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
+    </PropertyGroup>
+    <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+        <DebugSymbols>true</DebugSymbols>
+        <DebugType>full</DebugType>
+        <Optimize>false</Optimize>
+        <OutputPath>bin\Debug\</OutputPath>
+        <DefineConstants>DEBUG;TRACE</DefineConstants>
+        <ErrorReport>prompt</ErrorReport>
+        <WarningLevel>4</WarningLevel>
+        <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+    </PropertyGroup>
+    <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+        <DebugType>pdbonly</DebugType>
+        <Optimize>true</Optimize>
+        <OutputPath>bin\Release\</OutputPath>
+        <DefineConstants>TRACE</DefineConstants>
+        <ErrorReport>prompt</ErrorReport>
+        <WarningLevel>4</WarningLevel>
+        <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
     </PropertyGroup>
     <ItemGroup>
         <PackageReference Include="Microsoft.Reactive.Testing" Version="3.0.0" />