Skip to content

Commit a26d6f1

Browse files
XUnit
1 parent 3aa77c2 commit a26d6f1

File tree

6 files changed

+90
-89
lines changed

6 files changed

+90
-89
lines changed

src/ResourceManager/Common/Commands.Common.Strategies.UnitTest/Commands.Common.Strategies.UnitTest.csproj

Lines changed: 32 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,16 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
34
<PropertyGroup>
45
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
56
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6-
<ProjectGuid>{5C052681-DA3C-4FEA-8E02-7DFBB2A18B22}</ProjectGuid>
7+
<ProjectGuid>{6756A7F2-1141-4065-BA23-0C555D2A2BC3}</ProjectGuid>
78
<OutputType>Library</OutputType>
89
<AppDesignerFolder>Properties</AppDesignerFolder>
910
<RootNamespace>Microsoft.Azure.Commands.Common.Strategies.UnitTest</RootNamespace>
1011
<AssemblyName>Microsoft.Azure.Commands.Common.Strategies.UnitTest</AssemblyName>
1112
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
1213
<FileAlignment>512</FileAlignment>
13-
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
14-
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
15-
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
16-
<ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages</ReferencePath>
17-
<IsCodedUITest>False</IsCodedUITest>
18-
<TestProjectType>UnitTest</TestProjectType>
1914
</PropertyGroup>
2015
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
2116
<DebugSymbols>true</DebugSymbols>
@@ -36,48 +31,46 @@
3631
</PropertyGroup>
3732
<ItemGroup>
3833
<Reference Include="System" />
34+
<Reference Include="System.Core" />
35+
<Reference Include="System.Xml.Linq" />
36+
<Reference Include="System.Data.DataSetExtensions" />
37+
<Reference Include="Microsoft.CSharp" />
38+
<Reference Include="System.Data" />
39+
<Reference Include="System.Net.Http" />
40+
<Reference Include="System.Xml" />
41+
<Reference Include="xunit.abstractions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
42+
<HintPath>..\..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll</HintPath>
43+
<Private>True</Private>
44+
</Reference>
45+
<Reference Include="xunit.assert, Version=2.1.0.3179, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
46+
<HintPath>..\..\..\packages\xunit.assert.2.1.0\lib\dotnet\xunit.assert.dll</HintPath>
47+
<Private>True</Private>
48+
</Reference>
49+
<Reference Include="xunit.core, Version=2.1.0.3179, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
50+
<HintPath>..\..\..\packages\xunit.extensibility.core.2.1.0\lib\dotnet\xunit.core.dll</HintPath>
51+
<Private>True</Private>
52+
</Reference>
53+
<Reference Include="xunit.execution.desktop, Version=2.1.0.3179, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
54+
<HintPath>..\..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll</HintPath>
55+
<Private>True</Private>
56+
</Reference>
3957
</ItemGroup>
40-
<Choose>
41-
<When Condition="('$(VisualStudioVersion)' == '10.0' or '$(VisualStudioVersion)' == '') and '$(TargetFrameworkVersion)' == 'v3.5'">
42-
<ItemGroup>
43-
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
44-
</ItemGroup>
45-
</When>
46-
<Otherwise>
47-
<ItemGroup>
48-
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework" />
49-
</ItemGroup>
50-
</Otherwise>
51-
</Choose>
5258
<ItemGroup>
53-
<Compile Include="TimeSlotTest.cs" />
5459
<Compile Include="Properties\AssemblyInfo.cs" />
60+
<Compile Include="TimeSlotTest.cs" />
61+
</ItemGroup>
62+
<ItemGroup>
63+
<None Include="packages.config" />
5564
</ItemGroup>
5665
<ItemGroup>
5766
<ProjectReference Include="..\Commands.Common.Strategies\Commands.Common.Strategies.csproj">
5867
<Project>{eea69772-d41b-482a-9252-2b4595c59e53}</Project>
5968
<Name>Commands.Common.Strategies</Name>
6069
</ProjectReference>
6170
</ItemGroup>
62-
<Choose>
63-
<When Condition="'$(VisualStudioVersion)' == '10.0' And '$(IsCodedUITest)' == 'True'">
64-
<ItemGroup>
65-
<Reference Include="Microsoft.VisualStudio.QualityTools.CodedUITestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
66-
<Private>False</Private>
67-
</Reference>
68-
<Reference Include="Microsoft.VisualStudio.TestTools.UITest.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
69-
<Private>False</Private>
70-
</Reference>
71-
<Reference Include="Microsoft.VisualStudio.TestTools.UITest.Extension, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
72-
<Private>False</Private>
73-
</Reference>
74-
<Reference Include="Microsoft.VisualStudio.TestTools.UITesting, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
75-
<Private>False</Private>
76-
</Reference>
77-
</ItemGroup>
78-
</When>
79-
</Choose>
80-
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
71+
<ItemGroup>
72+
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
73+
</ItemGroup>
8174
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
8275
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
8376
Other similar extension points exist, see Microsoft.Common.targets.

src/ResourceManager/Common/Commands.Common.Strategies.UnitTest/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
[assembly: AssemblyConfiguration("")]
1111
[assembly: AssemblyCompany("")]
1212
[assembly: AssemblyProduct("Commands.Common.Strategies.UnitTest")]
13-
[assembly: AssemblyCopyright("Copyright © 2017")]
13+
[assembly: AssemblyCopyright("Copyright © Microsoft 2017")]
1414
[assembly: AssemblyTrademark("")]
1515
[assembly: AssemblyCulture("")]
1616

@@ -20,7 +20,7 @@
2020
[assembly: ComVisible(false)]
2121

2222
// The following GUID is for the ID of the typelib if this project is exposed to COM
23-
[assembly: Guid("5c052681-da3c-4fea-8e02-7dfbb2a18b22")]
23+
[assembly: Guid("6756a7f2-1141-4065-ba23-0c555d2a2bc3")]
2424

2525
// Version information for an assembly consists of the following four values:
2626
//
Lines changed: 39 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,71 @@
1-
using Microsoft.VisualStudio.TestTools.UnitTesting;
1+
using Xunit;
22

33
namespace Microsoft.Azure.Commands.Common.Strategies.UnitTest
44
{
5-
[TestClass]
65
public class TimeSlotTest
76
{
8-
[TestMethod]
7+
[Fact]
98
public void AddTest()
109
{
1110
var first = new TimeSlot();
1211

13-
Assert.AreEqual(0, first.Duration);
14-
Assert.AreEqual(0, first.TaskCount);
15-
Assert.AreEqual(null, first.Next);
12+
Assert.Equal(0, first.Duration);
13+
Assert.Equal(0, first.TaskCount);
14+
Assert.Equal(null, first.Next);
1615

1716
var next = first.AddTask(50);
1817

19-
Assert.AreEqual(50, first.Duration);
20-
Assert.AreEqual(1, first.TaskCount);
21-
Assert.AreEqual(next, first.Next);
18+
Assert.Equal(50, first.Duration);
19+
Assert.Equal(1, first.TaskCount);
20+
Assert.Equal(next, first.Next);
2221

23-
Assert.AreEqual(10.0, first.GetTaskProgress(10));
22+
Assert.Equal(10.0, first.GetTaskProgress(10));
2423

25-
Assert.AreEqual(0, next.Duration);
26-
Assert.AreEqual(0, next.TaskCount);
27-
Assert.AreEqual(null, next.Next);
24+
Assert.Equal(0, next.Duration);
25+
Assert.Equal(0, next.TaskCount);
26+
Assert.Equal(null, next.Next);
2827

2928
var next2 = first.AddTask(50);
3029

31-
Assert.AreEqual(50, first.Duration);
32-
Assert.AreEqual(2, first.TaskCount);
33-
Assert.AreEqual(next2, first.Next);
34-
Assert.AreEqual(next, first.Next);
30+
Assert.Equal(50, first.Duration);
31+
Assert.Equal(2, first.TaskCount);
32+
Assert.Equal(next2, first.Next);
33+
Assert.Equal(next, first.Next);
3534

36-
Assert.AreEqual(20.0, first.GetTaskProgress(40));
35+
Assert.Equal(20.0, first.GetTaskProgress(40));
3736

38-
Assert.AreEqual(0, next2.Duration);
39-
Assert.AreEqual(0, next2.TaskCount);
40-
Assert.AreEqual(null, next2.Next);
37+
Assert.Equal(0, next2.Duration);
38+
Assert.Equal(0, next2.TaskCount);
39+
Assert.Equal(null, next2.Next);
4140

4241
var next3 = first.AddTask(30);
43-
Assert.AreEqual(30, first.Duration);
44-
Assert.AreEqual(3, first.TaskCount);
45-
Assert.AreEqual(next3, first.Next);
42+
Assert.Equal(30, first.Duration);
43+
Assert.Equal(3, first.TaskCount);
44+
Assert.Equal(next3, first.Next);
4645

47-
Assert.AreEqual(3.0, first.GetTaskProgress(9));
46+
Assert.Equal(3.0, first.GetTaskProgress(9));
4847

49-
Assert.AreEqual(20, next3.Duration);
50-
Assert.AreEqual(2, next3.TaskCount);
51-
Assert.AreEqual(next2, next3.Next);
52-
Assert.AreEqual(next, next3.Next);
48+
Assert.Equal(20, next3.Duration);
49+
Assert.Equal(2, next3.TaskCount);
50+
Assert.Equal(next2, next3.Next);
51+
Assert.Equal(next, next3.Next);
5352

54-
Assert.AreEqual(10.0 + 5, first.GetTaskProgress(40));
53+
Assert.Equal(10.0 + 5, first.GetTaskProgress(40));
5554

56-
Assert.AreEqual(0, next2.Duration);
57-
Assert.AreEqual(0, next2.TaskCount);
58-
Assert.AreEqual(null, next2.Next);
55+
Assert.Equal(0, next2.Duration);
56+
Assert.Equal(0, next2.TaskCount);
57+
Assert.Equal(null, next2.Next);
5958

6059
var next4 = first.AddTask(75);
61-
Assert.AreEqual(25, next2.Duration);
62-
Assert.AreEqual(1, next2.TaskCount);
63-
Assert.AreEqual(next4, next2.Next);
60+
Assert.Equal(25, next2.Duration);
61+
Assert.Equal(1, next2.TaskCount);
62+
Assert.Equal(next4, next2.Next);
6463

65-
Assert.AreEqual((30.0 / 4) + (20.0 / 3) + 20, first.GetTaskProgress(70));
64+
Assert.Equal((30.0 / 4) + (20.0 / 3) + 20, first.GetTaskProgress(70));
6665

67-
Assert.AreEqual(0, next4.Duration);
68-
Assert.AreEqual(0, next4.TaskCount);
69-
Assert.AreEqual(null, next4.Next);
66+
Assert.Equal(0, next4.Duration);
67+
Assert.Equal(0, next4.TaskCount);
68+
Assert.Equal(null, next4.Next);
7069
}
7170
}
7271
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<packages>
3+
<package id="xunit" version="2.1.0" targetFramework="net452" />
4+
<package id="xunit.abstractions" version="2.0.0" targetFramework="net452" />
5+
<package id="xunit.assert" version="2.1.0" targetFramework="net452" />
6+
<package id="xunit.core" version="2.1.0" targetFramework="net452" />
7+
<package id="xunit.extensibility.core" version="2.1.0" targetFramework="net452" />
8+
<package id="xunit.extensibility.execution" version="2.1.0" targetFramework="net452" />
9+
</packages>

src/ResourceManager/Common/Commands.Common.Strategies/Properties/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
[assembly: AssemblyConfiguration("")]
1111
[assembly: AssemblyCompany("")]
1212
[assembly: AssemblyProduct("Commands.Common.Strategies")]
13-
[assembly: AssemblyCopyright("Copyright © 2017")]
13+
[assembly: AssemblyCopyright("Copyright © Microsoft 2017")]
1414
[assembly: AssemblyTrademark("")]
1515
[assembly: AssemblyCulture("")]
1616

src/ResourceManager/Compute/Compute.sln

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common.Authenticat
4040
EndProject
4141
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common.Strategies", "..\Common\Commands.Common.Strategies\Commands.Common.Strategies.csproj", "{EEA69772-D41B-482A-9252-2B4595C59E53}"
4242
EndProject
43-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common.Strategies.UnitTest", "..\Common\Commands.Common.Strategies.UnitTest\Commands.Common.Strategies.UnitTest.csproj", "{5C052681-DA3C-4FEA-8E02-7DFBB2A18B22}"
44-
EndProject
4543
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common.Authorization", "..\..\Common\Commands.Common.Authorization\Commands.Common.Authorization.csproj", "{24508E26-154D-47F1-80EE-439BF0710996}"
4644
EndProject
4745
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common.Graph.RBAC", "..\..\Common\Commands.Common.Graph.RBAC\Commands.Common.Graph.RBAC.csproj", "{269ACF73-0A34-42DC-AB9C-4B15931A489D}"
4846
EndProject
47+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common.Strategies.UnitTest", "..\Common\Commands.Common.Strategies.UnitTest\Commands.Common.Strategies.UnitTest.csproj", "{6756A7F2-1141-4065-BA23-0C555D2A2BC3}"
48+
EndProject
4949
Global
5050
GlobalSection(SolutionConfigurationPlatforms) = preSolution
5151
Debug|Any CPU = Debug|Any CPU
@@ -124,10 +124,6 @@ Global
124124
{EEA69772-D41B-482A-9252-2B4595C59E53}.Debug|Any CPU.Build.0 = Debug|Any CPU
125125
{EEA69772-D41B-482A-9252-2B4595C59E53}.Release|Any CPU.ActiveCfg = Release|Any CPU
126126
{EEA69772-D41B-482A-9252-2B4595C59E53}.Release|Any CPU.Build.0 = Release|Any CPU
127-
{5C052681-DA3C-4FEA-8E02-7DFBB2A18B22}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
128-
{5C052681-DA3C-4FEA-8E02-7DFBB2A18B22}.Debug|Any CPU.Build.0 = Debug|Any CPU
129-
{5C052681-DA3C-4FEA-8E02-7DFBB2A18B22}.Release|Any CPU.ActiveCfg = Release|Any CPU
130-
{5C052681-DA3C-4FEA-8E02-7DFBB2A18B22}.Release|Any CPU.Build.0 = Release|Any CPU
131127
{24508E26-154D-47F1-80EE-439BF0710996}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
132128
{24508E26-154D-47F1-80EE-439BF0710996}.Debug|Any CPU.Build.0 = Debug|Any CPU
133129
{24508E26-154D-47F1-80EE-439BF0710996}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -136,14 +132,18 @@ Global
136132
{269ACF73-0A34-42DC-AB9C-4B15931A489D}.Debug|Any CPU.Build.0 = Debug|Any CPU
137133
{269ACF73-0A34-42DC-AB9C-4B15931A489D}.Release|Any CPU.ActiveCfg = Release|Any CPU
138134
{269ACF73-0A34-42DC-AB9C-4B15931A489D}.Release|Any CPU.Build.0 = Release|Any CPU
135+
{6756A7F2-1141-4065-BA23-0C555D2A2BC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
136+
{6756A7F2-1141-4065-BA23-0C555D2A2BC3}.Debug|Any CPU.Build.0 = Debug|Any CPU
137+
{6756A7F2-1141-4065-BA23-0C555D2A2BC3}.Release|Any CPU.ActiveCfg = Release|Any CPU
138+
{6756A7F2-1141-4065-BA23-0C555D2A2BC3}.Release|Any CPU.Build.0 = Release|Any CPU
139139
EndGlobalSection
140140
GlobalSection(SolutionProperties) = preSolution
141141
HideSolutionNode = FALSE
142142
EndGlobalSection
143143
GlobalSection(NestedProjects) = preSolution
144144
{37C44181-3F1B-4ABD-8089-26DFAB4B6BA8} = {95C16AED-FD57-42A0-86C3-2CF4300A4817}
145145
{3436A126-EDC9-4060-8952-9A1BE34CDD95} = {95C16AED-FD57-42A0-86C3-2CF4300A4817}
146-
{5C052681-DA3C-4FEA-8E02-7DFBB2A18B22} = {95C16AED-FD57-42A0-86C3-2CF4300A4817}
146+
{6756A7F2-1141-4065-BA23-0C555D2A2BC3} = {95C16AED-FD57-42A0-86C3-2CF4300A4817}
147147
EndGlobalSection
148148
GlobalSection(ExtensibilityGlobals) = postSolution
149149
SolutionGuid = {54E53EE0-76A1-4911-8FED-63555F09459F}

0 commit comments

Comments
 (0)