Skip to content

Commit 4057766

Browse files
committed
Merge pull request #803 from markcowl/refactor
Test library changes and revert to xunit 1.9.2
2 parents 9e89d66 + 008b872 commit 4057766

File tree

517 files changed

+21933
-4746
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

517 files changed

+21933
-4746
lines changed

AzurePowershell.Test.targets

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444

4545
<ItemGroup>
4646
<XUnitTests Include=".\src\ResourceManager\AzureBackup\Commands.AzureBackup.Test\bin\Debug\Microsoft.Azure.Commands.AzureBackup.Test.dll"/>
47-
<XUnitTests Include=".\src\ResourceManager\SiteRecovery\Commands.SiteRecovery.Test\bin\Debug\Microsoft.Azure.Commands.SiteRecovery.Test.dll"/>
47+
<XUnitTests Include=".\src\ResourceManager\SiteRecovery\Commands.SiteRecovery.Test\bin\Debug\Microsoft.Azure.Commands.SiteRecovery.Test.dll"/>
4848
<XUnitTests Include=".\src\Common\Commands.Common.Test\bin\Debug\Microsoft.WindowsAzure.Commands.Common.Test.dll"/>
4949
<XUnitTests Include=".\src\ResourceManager\Sql\Commands.Sql.Test\bin\Debug\Microsoft.Azure.Commands.Sql.Test.dll"/>
5050
<XUnitTests Include=".\src\ServiceManagement\Services\Commands.Test\bin\Debug\Microsoft.WindowsAzure.Commands.Test.dll"/>
@@ -81,7 +81,7 @@
8181
<Message Importance="high" Text="Running XUnit tests" />
8282
<MakeDir Directories="$(TestOutputDirectory)" ContinueOnError="false" />
8383
<Exec
84-
Command="$(MSBuildProjectDirectory)\packages\xunit.runner.console.2.0.0\tools\xunit.console.x86.exe &quot;%(XUnitTests.Identity)&quot; -trait &quot;AcceptanceType=CheckIn&quot; -html &quot;$(TestOutputDirectory)\%(XUnitTests.Filename).html&quot;"
84+
Command="$(MSBuildProjectDirectory)\packages\xunit.runner.console.2.0.0\tools\xunit.console.x86.exe &quot;%(XUnitTests.Identity)&quot; -parallel none -maxthreads 0 -trait &quot;AcceptanceType=CheckIn&quot; -html &quot;$(TestOutputDirectory)\%(XUnitTests.Filename).html&quot;"
8585
Timeout="$(TestTimeout)" ContinueOnError="false"/>
8686
<OnError ExecuteTargets="TimeoutErrorHandler"/>
8787
</Target>

build.proj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
</ItemGroup>
2626

2727
<UsingTask
28-
AssemblyFile="$(MSBuildProjectDirectory)\packages\xunit.runner.console.2.0.0\tools\xunit.runner.msbuild.dll"
28+
AssemblyFile="$(MSBuildProjectDirectory)\src\packages\xunit.MSBuild.2.0.0.0\tools\xunit.runner.msbuild.dll"
2929
TaskName="Xunit.Runner.MSBuild.xunit" />
3030

3131
<!-- Clean the build in all configurations -->

src/Common/Commands.Common.Storage/Commands.Common.Storage.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
</Reference>
5959
<Reference Include="Microsoft.Azure.Common.Authentication, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
6060
<SpecificVersion>False</SpecificVersion>
61-
<HintPath>..\..\packages\Microsoft.Azure.Common.Authentication.1.1.3-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll</HintPath>
61+
<HintPath>..\..\packages\Microsoft.Azure.Common.Authentication.1.1.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll</HintPath>
6262
</Reference>
6363
<Reference Include="Microsoft.Azure.Common.NetFramework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
6464
<SpecificVersion>False</SpecificVersion>

src/Common/Commands.Common.Storage/WindowsAzureSubscriptionExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public static class WindowsAzureSubscriptionExtensions
2727
{
2828
private static Dictionary<Guid, CloudStorageAccount> storageAccountCache = new Dictionary<Guid,CloudStorageAccount>();
2929

30-
public static CloudStorageAccount GetCloudStorageAccount(this AzureSubscription subscription, AzureProfile profile)
30+
public static CloudStorageAccount GetCloudStorageAccount(this AzureSubscription subscription, AzureSMProfile profile)
3131
{
3232
if (subscription == null)
3333
{

src/Common/Commands.Common.Storage/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<packages>
33
<package id="Hyak.Common" version="1.0.2" targetFramework="net45" />
44
<package id="Microsoft.Azure.Common" version="2.1.0" targetFramework="net45" />
5-
<package id="Microsoft.Azure.Common.Authentication" version="1.1.3-preview" targetFramework="net45" />
5+
<package id="Microsoft.Azure.Common.Authentication" version="1.1.4-preview" targetFramework="net45" />
66
<package id="Microsoft.Azure.Common.Dependencies" version="1.0.0" targetFramework="net45" />
77
<package id="Microsoft.Azure.Management.Resources" version="2.18.7-preview" targetFramework="net45" />
88
<package id="Microsoft.Bcl" version="1.1.9" targetFramework="net45" />

src/Common/Commands.Common.Test/Commands.Common.Test.csproj

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="..\..\packages\xunit.runner.visualstudio.2.0.0\build\net20\xunit.runner.visualstudio.props" Condition="Exists('..\..\packages\xunit.runner.visualstudio.2.0.0\build\net20\xunit.runner.visualstudio.props')" />
3+
<Import Project="..\..\packages\xunit.runner.visualstudio.2.1.0-beta4-build1109\build\net20\xunit.runner.visualstudio.props" Condition="Exists('..\..\packages\xunit.runner.visualstudio.2.1.0-beta4-build1109\build\net20\xunit.runner.visualstudio.props')" />
44
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
55
<PropertyGroup>
66
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -16,7 +16,7 @@
1616
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
1717
<RestorePackages>true</RestorePackages>
1818
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
19-
<NuGetPackageImportStamp>773c4563</NuGetPackageImportStamp>
19+
<NuGetPackageImportStamp>9ff8fb41</NuGetPackageImportStamp>
2020
</PropertyGroup>
2121
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
2222
<DebugSymbols>true</DebugSymbols>
@@ -58,17 +58,21 @@
5858
</Reference>
5959
<Reference Include="Microsoft.Azure.Common.Authentication, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
6060
<SpecificVersion>False</SpecificVersion>
61-
<HintPath>..\..\packages\Microsoft.Azure.Common.Authentication.1.1.3-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll</HintPath>
61+
<HintPath>..\..\packages\Microsoft.Azure.Common.Authentication.1.1.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll</HintPath>
6262
</Reference>
6363
<Reference Include="Microsoft.Azure.Common.NetFramework">
6464
<HintPath>..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll</HintPath>
6565
</Reference>
66+
<Reference Include="Microsoft.Azure.KeyVault.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
67+
<HintPath>..\..\packages\Microsoft.Azure.KeyVault.Core.1.0.0\lib\net40\Microsoft.Azure.KeyVault.Core.dll</HintPath>
68+
<Private>True</Private>
69+
</Reference>
6670
<Reference Include="Microsoft.Azure.ResourceManager, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
6771
<SpecificVersion>False</SpecificVersion>
6872
<HintPath>..\..\packages\Microsoft.Azure.Management.Resources.2.18.7-preview\lib\net40\Microsoft.Azure.ResourceManager.dll</HintPath>
6973
</Reference>
7074
<Reference Include="Microsoft.Azure.Test.HttpRecorder, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
71-
<HintPath>..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5687.28567-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll</HintPath>
75+
<HintPath>..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5715.36130-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll</HintPath>
7276
<Private>True</Private>
7377
</Reference>
7478
<Reference Include="Microsoft.Data.Edm, Version=5.6.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
@@ -160,13 +164,18 @@
160164
<Reference Include="System.Data" />
161165
<Reference Include="System.Xml" />
162166
<Reference Include="xunit, Version=1.9.2.1705, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
163-
<SpecificVersion>False</SpecificVersion>
164167
<HintPath>..\..\packages\xunit.1.9.2\lib\net20\xunit.dll</HintPath>
168+
<Private>True</Private>
169+
</Reference>
170+
<Reference Include="xunit.extensions, Version=1.9.2.1705, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
171+
<HintPath>..\..\packages\xunit.extensions.1.9.2\lib\net20\xunit.extensions.dll</HintPath>
172+
<Private>True</Private>
165173
</Reference>
166174
</ItemGroup>
167175
<ItemGroup>
168176
<Compile Include="Common\AuthenticationFactoryTests.cs" />
169177
<Compile Include="Common\MockSubsciptionFactory.cs" />
178+
<Compile Include="Common\ProfileClientTests.cs" />
170179
<Compile Include="Common\ServicePrincipalStoreTests.cs" />
171180
<Compile Include="Common\GeneralUtilitiesTests.cs" />
172181
<Compile Include="Common\Data.cs" />
@@ -182,14 +191,14 @@
182191
<Compile Include="Common\TestBase.cs" />
183192
<Compile Include="Common\ConversionUtilitiesTests.cs" />
184193
<Compile Include="Common\Testing.cs" />
185-
<Compile Include="Common\TestingTracingInterceptor.cs" />
186194
<Compile Include="Mocks\MockCommandRuntime.cs" />
187195
<Compile Include="Properties\AssemblyInfo.cs" />
188196
<Compile Include="Properties\Resources.Designer.cs">
189197
<AutoGen>True</AutoGen>
190198
<DesignTime>True</DesignTime>
191199
<DependentUpon>Resources.resx</DependentUpon>
192200
</Compile>
201+
<Compile Include="Common\PSTestTracingInterceptor.cs" />
193202
<Compile Include="Resources\ResourceLocator.cs" />
194203
</ItemGroup>
195204
<ItemGroup>
@@ -310,6 +319,6 @@
310319
<PropertyGroup>
311320
<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>
312321
</PropertyGroup>
313-
<Error Condition="!Exists('..\..\packages\xunit.runner.visualstudio.2.0.0\build\net20\xunit.runner.visualstudio.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\xunit.runner.visualstudio.2.0.0\build\net20\xunit.runner.visualstudio.props'))" />
322+
<Error Condition="!Exists('..\..\packages\xunit.runner.visualstudio.2.1.0-beta4-build1109\build\net20\xunit.runner.visualstudio.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\xunit.runner.visualstudio.2.1.0-beta4-build1109\build\net20\xunit.runner.visualstudio.props'))" />
314323
</Target>
315324
</Project>

src/Common/Commands.Common.Test/Common/MockSubsciptionFactory.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ public void AddAction(Azure.Common.Authentication.Models.IClientAction action)
3131
throw new NotImplementedException();
3232
}
3333

34-
public TClient CreateClient<TClient>(Azure.Common.Authentication.Models.AzureProfile profile, Azure.Common.Authentication.Models.AzureSubscription subscription, Azure.Common.Authentication.Models.AzureEnvironment.Endpoint endpoint) where TClient : Hyak.Common.ServiceClient<TClient>
34+
public TClient CreateClient<TClient>(Azure.Common.Authentication.Models.AzureSMProfile profile, Azure.Common.Authentication.Models.AzureSubscription subscription, Azure.Common.Authentication.Models.AzureEnvironment.Endpoint endpoint) where TClient : Hyak.Common.ServiceClient<TClient>
3535
{
3636
throw new NotImplementedException();
3737
}
3838

39-
public TClient CreateClient<TClient>(Azure.Common.Authentication.Models.AzureProfile profile, Azure.Common.Authentication.Models.AzureEnvironment.Endpoint endpoint) where TClient : Hyak.Common.ServiceClient<TClient>
39+
public TClient CreateClient<TClient>(Azure.Common.Authentication.Models.AzureSMProfile profile, Azure.Common.Authentication.Models.AzureEnvironment.Endpoint endpoint) where TClient : Hyak.Common.ServiceClient<TClient>
4040
{
4141
throw new NotImplementedException();
4242
}

src/Common/Commands.Common.Test/Common/TestingTracingInterceptor.cs renamed to src/Common/Commands.Common.Test/Common/PSTestTracingInterceptor.cs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424

2525
namespace Microsoft.WindowsAzure.Commands.Common.Test.Common
2626
{
27-
public class TestingTracingInterceptor : ICloudTracingInterceptor
27+
public class PSTestTracingInterceptor : ICloudTracingInterceptor
2828
{
29-
private TestingTracingInterceptor()
29+
private PSTestTracingInterceptor()
3030
{
3131
#if DEBUG
3232
if (Debug.Listeners.Count < 1)
@@ -82,35 +82,34 @@ public void ReceiveResponse(string invocationId, HttpResponseMessage response)
8282

8383
public void Error(string invocationId, Exception ex)
8484
{
85-
Write("{0} - Error: {1}", invocationId, ex);
8685
}
8786

8887
public void Exit(string invocationId, object result)
8988
{
9089
Write("{0} - Exited method with result: {1}", invocationId, result);
9190
}
9291

93-
static TestingTracingInterceptor()
92+
static PSTestTracingInterceptor()
9493
{
95-
TestingTracingInterceptor.Singleton = new TestingTracingInterceptor();
94+
PSTestTracingInterceptor.Singleton = new PSTestTracingInterceptor();
9695
}
9796

9897
public static void AddToContext()
9998
{
10099
try
101100
{
102-
TracingAdapter.RemoveTracingInterceptor(TestingTracingInterceptor.Singleton);
101+
TracingAdapter.RemoveTracingInterceptor(PSTestTracingInterceptor.Singleton);
103102
}
104103
catch
105104
{
106105
}
107-
TracingAdapter.AddTracingInterceptor(TestingTracingInterceptor.Singleton);
106+
TracingAdapter.AddTracingInterceptor(PSTestTracingInterceptor.Singleton);
108107
}
109108

110-
static TestingTracingInterceptor Singleton
109+
static PSTestTracingInterceptor Singleton
111110
{
112111
get;
113112
set;
114113
}
115114
}
116-
}
115+
}

0 commit comments

Comments
 (0)