Skip to content

Commit 2da8e07

Browse files
Upgrade Atata.Configuration.Json.Tests project to new .NET Core project format
1 parent 7bcd2c5 commit 2da8e07

File tree

10 files changed

+73
-206
lines changed

10 files changed

+73
-206
lines changed
Lines changed: 61 additions & 161 deletions
Original file line numberDiff line numberDiff line change
@@ -1,211 +1,111 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="..\packages\NUnit3TestAdapter.3.15.1\build\net35\NUnit3TestAdapter.props" Condition="Exists('..\packages\NUnit3TestAdapter.3.15.1\build\net35\NUnit3TestAdapter.props')" />
4-
<Import Project="..\packages\NUnit.3.12.0\build\NUnit.props" Condition="Exists('..\packages\NUnit.3.12.0\build\NUnit.props')" />
5-
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
63
<PropertyGroup>
7-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
8-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
9-
<ProjectGuid>{426C070A-8BE7-4434-B90B-BC1024DC6D7F}</ProjectGuid>
10-
<OutputType>Library</OutputType>
11-
<AppDesignerFolder>Properties</AppDesignerFolder>
12-
<RootNamespace>Atata.Configuration.Json.Tests</RootNamespace>
13-
<AssemblyName>Atata.Configuration.Json.Tests</AssemblyName>
14-
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
15-
<FileAlignment>512</FileAlignment>
16-
<NuGetPackageImportStamp>
17-
</NuGetPackageImportStamp>
18-
<TargetFrameworkProfile />
19-
</PropertyGroup>
20-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
21-
<DebugSymbols>true</DebugSymbols>
22-
<DebugType>full</DebugType>
23-
<Optimize>false</Optimize>
24-
<OutputPath>bin\Debug\</OutputPath>
25-
<DefineConstants>DEBUG;TRACE</DefineConstants>
26-
<ErrorReport>prompt</ErrorReport>
27-
<WarningLevel>4</WarningLevel>
4+
<TargetFrameworks>net45</TargetFrameworks>
5+
<Authors>Yevgeniy Shunevych</Authors>
6+
<Company>Yevgeniy Shunevych</Company>
7+
<Product>Atata Framework</Product>
8+
<Copyright>© Yevgeniy Shunevych 2019</Copyright>
9+
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
10+
<PackageProjectUrl>https://github.com/atata-framework/atata-configuration-json</PackageProjectUrl>
11+
<RepositoryUrl>https://github.com/atata-framework/atata-configuration-json</RepositoryUrl>
2812
<CodeAnalysisRuleSet>..\Atata.ruleset</CodeAnalysisRuleSet>
29-
<Prefer32Bit>false</Prefer32Bit>
3013
</PropertyGroup>
31-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
32-
<DebugType>pdbonly</DebugType>
33-
<Optimize>true</Optimize>
34-
<OutputPath>bin\Release\</OutputPath>
35-
<DefineConstants>TRACE</DefineConstants>
36-
<ErrorReport>prompt</ErrorReport>
37-
<WarningLevel>4</WarningLevel>
38-
<Prefer32Bit>false</Prefer32Bit>
14+
15+
<PropertyGroup Condition="$(Configuration)=='Debug'">
16+
<DefineConstants>DEBUG</DefineConstants>
3917
</PropertyGroup>
18+
4019
<ItemGroup>
41-
<Reference Include="Atata, Version=1.4.0.0, Culture=neutral, processorArchitecture=MSIL">
42-
<HintPath>..\packages\Atata.1.4.0\lib\net45\Atata.dll</HintPath>
43-
</Reference>
44-
<Reference Include="Atata.WebDriverExtras, Version=1.2.0.0, Culture=neutral, processorArchitecture=MSIL">
45-
<HintPath>..\packages\Atata.WebDriverExtras.1.2.0\lib\net45\Atata.WebDriverExtras.dll</HintPath>
46-
</Reference>
47-
<Reference Include="FluentAssertions, Version=4.19.4.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
48-
<HintPath>..\packages\FluentAssertions.4.19.4\lib\net40\FluentAssertions.dll</HintPath>
49-
<Private>True</Private>
50-
</Reference>
51-
<Reference Include="FluentAssertions.Core, Version=4.19.4.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
52-
<HintPath>..\packages\FluentAssertions.4.19.4\lib\net40\FluentAssertions.Core.dll</HintPath>
53-
<Private>True</Private>
54-
</Reference>
55-
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
56-
<HintPath>..\packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
57-
</Reference>
58-
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
59-
<HintPath>..\packages\NLog.4.6.7\lib\net45\NLog.dll</HintPath>
60-
</Reference>
61-
<Reference Include="nunit.framework, Version=3.12.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
62-
<HintPath>..\packages\NUnit.3.12.0\lib\net45\nunit.framework.dll</HintPath>
63-
</Reference>
64-
<Reference Include="System" />
65-
<Reference Include="System.Configuration" />
66-
<Reference Include="System.Core" />
67-
<Reference Include="System.Drawing" />
68-
<Reference Include="System.IO.Compression" />
69-
<Reference Include="System.Runtime.Serialization" />
70-
<Reference Include="System.ServiceModel" />
71-
<Reference Include="System.Transactions" />
72-
<Reference Include="System.Xml.Linq" />
73-
<Reference Include="System.Data.DataSetExtensions" />
74-
<Reference Include="Microsoft.CSharp" />
75-
<Reference Include="System.Data" />
76-
<Reference Include="System.Xml" />
77-
<Reference Include="WebDriver, Version=3.141.0.0, Culture=neutral, processorArchitecture=MSIL">
78-
<HintPath>..\packages\Selenium.WebDriver.3.141.0\lib\net45\WebDriver.dll</HintPath>
79-
</Reference>
20+
<PackageReference Include="FluentAssertions" Version="5.9.0" />
21+
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.8">
22+
<PrivateAssets>all</PrivateAssets>
23+
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
24+
</PackageReference>
25+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
26+
<PackageReference Include="NLog" Version="4.6.8" />
27+
<PackageReference Include="NUnit" Version="3.12.0" />
28+
<PackageReference Include="NUnit3TestAdapter" Version="3.15.1" />
29+
<PackageReference Include="Selenium.WebDriver" Version="3.141.0" />
30+
<PackageReference Include="Selenium.WebDriver.ChromeDriver" Version="77.0.3865.4000" />
31+
<PackageReference Include="Selenium.WebDriver.GeckoDriver" Version="0.26.0" />
32+
<PackageReference Include="Selenium.WebDriver.IEDriver" Version="3.150.1" />
33+
<PackageReference Include="Selenium.WebDriver.MicrosoftDriver" Version="17.17134.0" />
34+
<PackageReference Include="SonarAnalyzer.CSharp" Version="8.0.0.9566">
35+
<PrivateAssets>all</PrivateAssets>
36+
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
37+
</PackageReference>
38+
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
39+
<PrivateAssets>all</PrivateAssets>
40+
</PackageReference>
8041
</ItemGroup>
42+
8143
<ItemGroup>
82-
<Compile Include="..\CommonAssemblyInfo.cs">
83-
<Link>Properties\CommonAssemblyInfo.cs</Link>
84-
</Compile>
85-
<Compile Include="CustomJsonConfig.cs" />
86-
<Compile Include="CustomJsonConfigTests.cs" />
87-
<Compile Include="CustomSettingsTests.cs" />
88-
<Compile Include="DriverTests.cs" />
89-
<Compile Include="ConfigFilePathTests.cs" />
90-
<Compile Include="GeneralSettingsTests.cs" />
91-
<Compile Include="LogConsumerTests.cs" />
92-
<Compile Include="Overrides\RemoteDriverJsonMapperOverride.cs" />
93-
<Compile Include="Overrides\RemoteDriverAtataContextBuilderOverride.cs" />
94-
<Compile Include="Overrides\EdgeDriverJsonMapperOverride.cs" />
95-
<Compile Include="Overrides\EdgeAtataContextBuilderOverride.cs" />
96-
<Compile Include="Overrides\InternetExplorerDriverJsonMapperOverride.cs" />
97-
<Compile Include="Overrides\InternetExplorerAtataContextBuilderOverride.cs" />
98-
<Compile Include="Overrides\FirefoxDriverJsonMapperOverride.cs" />
99-
<Compile Include="Overrides\FirefoxAtataContextBuilderOverride.cs" />
100-
<Compile Include="Overrides\ChromeAtataContextBuilderOverride.cs" />
101-
<Compile Include="Overrides\ChromeDriverJsonMapperOverride.cs" />
102-
<Compile Include="Overrides\DriverContext`2.cs" />
103-
<Compile Include="Overrides\RemoteDriverContext.cs" />
104-
<Compile Include="Properties\AssemblyInfo.cs" />
105-
<Compile Include="ScreenshotConsumerTests.cs" />
106-
<Compile Include="SetUpFixture.cs" />
107-
<Compile Include="TestFixture.cs" />
44+
<ProjectReference Include="..\Atata.Configuration.Json\Atata.Configuration.Json.csproj" />
10845
</ItemGroup>
46+
10947
<ItemGroup>
110-
<ProjectReference Include="..\Atata.Configuration.Json\Atata.Configuration.Json.csproj">
111-
<Project>{d58a65c7-b2d0-4c1e-b97c-c31a6833ae35}</Project>
112-
<Name>Atata.Configuration.Json</Name>
113-
</ProjectReference>
48+
<Folder Include="Properties\" />
11449
</ItemGroup>
50+
11551
<ItemGroup>
116-
<None Include="Atata.QA.json">
52+
<None Update="Atata.json">
11753
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
11854
</None>
119-
<None Include="Atata.json">
55+
<None Update="Atata.QA.json">
12056
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
12157
</None>
122-
<None Include="Configs\CustomSettingsOverride2.json">
58+
<None Update="Configs\Chrome+NUnit.json">
12359
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
12460
</None>
125-
<None Include="Configs\CustomSettingsOverride.json">
61+
<None Update="Configs\Chrome.json">
12662
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
12763
</None>
128-
<None Include="Configs\CustomSettings.json">
64+
<None Update="Configs\CustomSettings.json">
12965
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
13066
</None>
131-
<None Include="Configs\MultipleDrivers.json">
67+
<None Update="Configs\CustomSettingsOverride.json">
13268
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
13369
</None>
134-
<None Include="Configs\Edge.json">
70+
<None Update="Configs\CustomSettingsOverride2.json">
13571
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
13672
</None>
137-
<None Include="Configs\InternetExplorer.json">
73+
<None Update="Configs\Edge.json">
13874
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
13975
</None>
140-
<None Include="Configs\Firefox.json">
76+
<None Update="Configs\Firefox.json">
14177
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
14278
</None>
143-
<None Include="Configs\Chrome.json">
79+
<None Update="Configs\InternetExplorer.json">
14480
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
14581
</None>
146-
<None Include="Configs\RemoteTypeless.json">
82+
<None Update="Configs\MultipleDrivers.json">
14783
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
14884
</None>
149-
<None Include="Configs\RemoteFirefox.json">
85+
<None Update="Configs\Remote.json">
15086
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
15187
</None>
152-
<None Include="Configs\RemoteChrome.json">
88+
<None Update="Configs\RemoteChrome.json">
15389
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
15490
</None>
155-
<None Include="ScreenshotConsumers.json">
91+
<None Update="Configs\RemoteFirefox.json">
15692
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
15793
</None>
158-
<None Include="LogConsumers.json">
94+
<None Update="Configs\RemoteTypeless.json">
15995
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
16096
</None>
161-
<None Include="Simple.QA.json">
97+
<None Update="LogConsumers.json">
16298
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
16399
</None>
164-
<None Include="Simple.json">
100+
<None Update="ScreenshotConsumers.json">
165101
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
166102
</None>
167-
<None Include="Configs\Remote.json">
103+
<None Update="Simple.json">
168104
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
169105
</None>
170-
<None Include="Configs\Chrome+NUnit.json">
106+
<None Update="Simple.QA.json">
171107
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
172108
</None>
173-
<None Include="packages.config">
174-
<SubType>Designer</SubType>
175-
</None>
176-
</ItemGroup>
177-
<ItemGroup>
178-
<Analyzer Include="..\packages\StyleCop.Analyzers.1.0.2\analyzers\dotnet\cs\StyleCop.Analyzers.CodeFixes.dll" />
179-
<Analyzer Include="..\packages\StyleCop.Analyzers.1.0.2\analyzers\dotnet\cs\StyleCop.Analyzers.dll" />
180-
</ItemGroup>
181-
<ItemGroup>
182-
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
183-
</ItemGroup>
184-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
185-
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
186-
<PropertyGroup>
187-
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
188-
</PropertyGroup>
189-
<Error Condition="!Exists('..\packages\Selenium.WebDriver.MicrosoftDriver.17.17134.0\build\Selenium.WebDriver.MicrosoftDriver.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Selenium.WebDriver.MicrosoftDriver.17.17134.0\build\Selenium.WebDriver.MicrosoftDriver.targets'))" />
190-
<Error Condition="!Exists('..\packages\NUnit.3.12.0\build\NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit.3.12.0\build\NUnit.props'))" />
191-
<Error Condition="!Exists('..\packages\NUnit3TestAdapter.3.15.1\build\net35\NUnit3TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit3TestAdapter.3.15.1\build\net35\NUnit3TestAdapter.props'))" />
192-
<Error Condition="!Exists('..\packages\Selenium.WebDriver.ChromeDriver.77.0.3865.4000\build\Selenium.WebDriver.ChromeDriver.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Selenium.WebDriver.ChromeDriver.77.0.3865.4000\build\Selenium.WebDriver.ChromeDriver.targets'))" />
193-
<Error Condition="!Exists('..\packages\Selenium.WebDriver.GeckoDriver.0.26.0\build\Selenium.WebDriver.GeckoDriver.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Selenium.WebDriver.GeckoDriver.0.26.0\build\Selenium.WebDriver.GeckoDriver.targets'))" />
194-
</Target>
195-
<ItemGroup>
196-
<Content Include="..\packages\WebDriver.IEDriverServer.win32.3.8.0\content\IEDriverServer.exe">
197-
<Link>IEDriverServer.exe</Link>
198-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
199-
</Content>
200109
</ItemGroup>
201-
<Import Project="..\packages\Selenium.WebDriver.MicrosoftDriver.17.17134.0\build\Selenium.WebDriver.MicrosoftDriver.targets" Condition="Exists('..\packages\Selenium.WebDriver.MicrosoftDriver.17.17134.0\build\Selenium.WebDriver.MicrosoftDriver.targets')" />
202-
<Import Project="..\packages\Selenium.WebDriver.ChromeDriver.77.0.3865.4000\build\Selenium.WebDriver.ChromeDriver.targets" Condition="Exists('..\packages\Selenium.WebDriver.ChromeDriver.77.0.3865.4000\build\Selenium.WebDriver.ChromeDriver.targets')" />
203-
<Import Project="..\packages\Selenium.WebDriver.GeckoDriver.0.26.0\build\Selenium.WebDriver.GeckoDriver.targets" Condition="Exists('..\packages\Selenium.WebDriver.GeckoDriver.0.26.0\build\Selenium.WebDriver.GeckoDriver.targets')" />
204-
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
205-
Other similar extension points exist, see Microsoft.Common.targets.
206-
<Target Name="BeforeBuild">
207-
</Target>
208-
<Target Name="AfterBuild">
209-
</Target>
210-
-->
211-
</Project>
110+
111+
</Project>

src/Atata.Configuration.Json.Tests/CustomSettingsTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public void CustomSettings()
2424
CustomJsonConfig.Current.Section.StringProperty.Should().Be("section_str");
2525
CustomJsonConfig.Current.Section.BoolProperty.Should().Be(true);
2626

27-
CustomJsonConfig.Current.Items.ShouldBeEquivalentTo(new[]
27+
CustomJsonConfig.Current.Items.Should().BeEquivalentTo(new[]
2828
{
2929
new CustomJsonConfig.CustomItemSection
3030
{
@@ -57,7 +57,7 @@ public void CustomSettings_Merged()
5757
CustomJsonConfig.Current.Section.StringProperty.Should().Be("section_str");
5858
CustomJsonConfig.Current.Section.BoolProperty.Should().Be(false);
5959

60-
CustomJsonConfig.Current.Items.ShouldBeEquivalentTo(new[]
60+
CustomJsonConfig.Current.Items.Should().BeEquivalentTo(new[]
6161
{
6262
new CustomJsonConfig.CustomItemSection
6363
{

src/Atata.Configuration.Json.Tests/DriverTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ private static void VerifyChromeOptions(ChromeOptions options)
8686
var capabilities = options.ToCapabilities();
8787
var optionsCapabilities = (Dictionary<string, object>)capabilities.GetCapability(ChromeOptions.Capability);
8888

89-
capabilities.GetCapability(CapabilityType.LoggingPreferences).ShouldBeEquivalentTo(new Dictionary<string, object>
89+
capabilities.GetCapability(CapabilityType.LoggingPreferences).Should().BeEquivalentTo(new Dictionary<string, object>
9090
{
9191
["browser"] = "INFO",
9292
["driver"] = "WARNING"

src/Atata.Configuration.Json.Tests/LogConsumerTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ public void LogConsumer_AllKinds()
2222
new LogConsumerInfo(new CustomLogConsumer { IntProperty = 15 }, LogLevel.Error)
2323
};
2424

25-
builder.BuildingContext.LogConsumers.ShouldAllBeEquivalentTo(
25+
builder.BuildingContext.LogConsumers.Should().BeEquivalentTo(
2626
expected,
2727
opt => opt.IncludingAllRuntimeProperties().Using<ILogConsumer>(ctx =>
2828
{
2929
ctx.Subject.Should().BeOfType(ctx.Expectation.GetType());
30-
ctx.Subject.ShouldBeEquivalentTo(ctx.Expectation, opt2 => opt2.IncludingAllRuntimeProperties());
30+
ctx.Subject.Should().BeEquivalentTo(ctx.Expectation, opt2 => opt2.IncludingAllRuntimeProperties());
3131
}).WhenTypeIs<ILogConsumer>());
3232
}
3333

src/Atata.Configuration.Json.Tests/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/Atata.Configuration.Json.Tests/ScreenshotConsumerTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public void ScreenshotConsumer_AllKinds()
2424

2525
builder.BuildingContext.ScreenshotConsumers.Select(x => x.GetType()).Should().BeEquivalentTo(expected.Select(x => x.GetType()));
2626

27-
builder.BuildingContext.ScreenshotConsumers.ShouldAllBeEquivalentTo(
27+
builder.BuildingContext.ScreenshotConsumers.Should().BeEquivalentTo(
2828
expected,
2929
opt => opt.IncludingAllRuntimeProperties());
3030
}

src/Atata.Configuration.Json.Tests/packages.config

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)