Skip to content

Commit

Permalink
Ajustes para executar os testes no Visual Studio 2017
Browse files Browse the repository at this point in the history
  • Loading branch information
brunoSpeedrun committed Sep 28, 2019
1 parent 3da920b commit 237833d
Show file tree
Hide file tree
Showing 47 changed files with 93,595 additions and 6 deletions.
2 changes: 1 addition & 1 deletion MosaicoSolutions.ViaCep/MosaicoSolutions.ViaCep.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<HintPath>..\packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand Down
2 changes: 1 addition & 1 deletion MosaicoSolutions.ViaCep/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="12.0.1" targetFramework="net45" />
<package id="Newtonsoft.Json" version="12.0.2" targetFramework="net45" />
</packages>
8 changes: 4 additions & 4 deletions ViaCepTest/MosaicoSolutions/ViaCep/ViaCepTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,20 +65,20 @@ public void DeveObterEnderecoComoXml()
public async Task DeveObterEnderecoComoQuertyAsync()
{
var quertyEndereco = await _viaCepService.ObterEnderecoComoQuertyAsync("01001000");
Assert.True(quertyEndereco.Contains("cep=01001-000&logradouro=Pra%C3%A7a+da+S%C3%A9"));
Assert.True(quertyEndereco.Contains("cep=01001-000&logradouro=Pra%C3%A7a%20da%20S%C3%A9"));

quertyEndereco = await _viaCepService.ObterEnderecoComoQuertyAsync("01001-000");
Assert.True(quertyEndereco.Contains("cep=01001-000&logradouro=Pra%C3%A7a+da+S%C3%A9"));
Assert.True(quertyEndereco.Contains("cep=01001-000&logradouro=Pra%C3%A7a%20da%20S%C3%A9"));
}

[Test]
public void DeveObterEnderecoComoQuerty()
{
var quertyEndereco = _viaCepService.ObterEnderecoComoQuerty("01001000");
Assert.True(quertyEndereco.Contains("cep=01001-000&logradouro=Pra%C3%A7a+da+S%C3%A9"));
Assert.True(quertyEndereco.Contains("cep=01001-000&logradouro=Pra%C3%A7a%20da%20S%C3%A9"));

quertyEndereco = _viaCepService.ObterEnderecoComoQuerty("01001-000");
Assert.True(quertyEndereco.Contains("cep=01001-000&logradouro=Pra%C3%A7a+da+S%C3%A9"));
Assert.True(quertyEndereco.Contains("cep=01001-000&logradouro=Pra%C3%A7a%20da%20S%C3%A9"));
}

#endregion
Expand Down
13 changes: 13 additions & 0 deletions ViaCepTest/ViaCepTest.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\Microsoft.NET.Test.Sdk.16.3.0\build\net40\Microsoft.NET.Test.Sdk.props" Condition="Exists('..\packages\Microsoft.NET.Test.Sdk.16.3.0\build\net40\Microsoft.NET.Test.Sdk.props')" />
<Import Project="..\packages\Microsoft.CodeCoverage.16.3.0\build\netstandard1.0\Microsoft.CodeCoverage.props" Condition="Exists('..\packages\Microsoft.CodeCoverage.16.3.0\build\netstandard1.0\Microsoft.CodeCoverage.props')" />
<Import Project="..\packages\NUnit3TestAdapter.3.15.1\build\net35\NUnit3TestAdapter.props" Condition="Exists('..\packages\NUnit3TestAdapter.3.15.1\build\net35\NUnit3TestAdapter.props')" />
<Import Project="..\packages\NUnit.3.11.0\build\NUnit.props" Condition="Exists('..\packages\NUnit.3.11.0\build\NUnit.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
Expand Down Expand Up @@ -37,6 +40,9 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.VisualStudio.CodeCoverage.Shim, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.CodeCoverage.16.3.0\lib\net45\Microsoft.VisualStudio.CodeCoverage.Shim.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
Expand Down Expand Up @@ -80,7 +86,14 @@
<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>
</PropertyGroup>
<Error Condition="!Exists('..\packages\NUnit.3.11.0\build\NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit.3.11.0\build\NUnit.props'))" />
<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'))" />
<Error Condition="!Exists('..\packages\Microsoft.CodeCoverage.16.3.0\build\netstandard1.0\Microsoft.CodeCoverage.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.CodeCoverage.16.3.0\build\netstandard1.0\Microsoft.CodeCoverage.props'))" />
<Error Condition="!Exists('..\packages\Microsoft.CodeCoverage.16.3.0\build\netstandard1.0\Microsoft.CodeCoverage.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.CodeCoverage.16.3.0\build\netstandard1.0\Microsoft.CodeCoverage.targets'))" />
<Error Condition="!Exists('..\packages\Microsoft.NET.Test.Sdk.16.3.0\build\net40\Microsoft.NET.Test.Sdk.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.NET.Test.Sdk.16.3.0\build\net40\Microsoft.NET.Test.Sdk.props'))" />
<Error Condition="!Exists('..\packages\Microsoft.NET.Test.Sdk.16.3.0\build\net40\Microsoft.NET.Test.Sdk.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.NET.Test.Sdk.16.3.0\build\net40\Microsoft.NET.Test.Sdk.targets'))" />
</Target>
<Import Project="..\packages\Microsoft.CodeCoverage.16.3.0\build\netstandard1.0\Microsoft.CodeCoverage.targets" Condition="Exists('..\packages\Microsoft.CodeCoverage.16.3.0\build\netstandard1.0\Microsoft.CodeCoverage.targets')" />
<Import Project="..\packages\Microsoft.NET.Test.Sdk.16.3.0\build\net40\Microsoft.NET.Test.Sdk.targets" Condition="Exists('..\packages\Microsoft.NET.Test.Sdk.16.3.0\build\net40\Microsoft.NET.Test.Sdk.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">
Expand Down
Binary file modified ViaCepTest/bin/Debug/MosaicoSolutions.ViaCep.dll
Binary file not shown.
Binary file modified ViaCepTest/bin/Debug/MosaicoSolutions.ViaCep.pdb
Binary file not shown.
Binary file modified ViaCepTest/bin/Debug/ViaCepTest.dll
Binary file not shown.
Binary file modified ViaCepTest/bin/Debug/ViaCepTest.pdb
Binary file not shown.
18 changes: 18 additions & 0 deletions ViaCepTest/obj/Debug/ViaCepTest.csproj.FileListAbsolute.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,21 @@ C:\Users\mario\source\repos\ViaCep\ViaCepTest\bin\Debug\nunit.framework.pdb
C:\Users\mario\source\repos\ViaCep\ViaCepTest\bin\Debug\Newtonsoft.Json.dll
C:\Users\mario\source\repos\ViaCep\ViaCepTest\bin\Debug\Newtonsoft.Json.pdb
C:\Users\mario\source\repos\ViaCep\ViaCepTest\bin\Debug\Newtonsoft.Json.xml
C:\Users\bruno\Documents\Github\ViaCep\ViaCepTest\bin\Debug\NUnit3.TestAdapter.dll
C:\Users\bruno\Documents\Github\ViaCep\ViaCepTest\bin\Debug\NUnit3.TestAdapter.pdb
C:\Users\bruno\Documents\Github\ViaCep\ViaCepTest\bin\Debug\nunit.engine.dll
C:\Users\bruno\Documents\Github\ViaCep\ViaCepTest\bin\Debug\nunit.engine.api.dll
C:\Users\bruno\Documents\Github\ViaCep\ViaCepTest\bin\Debug\ViaCepTest.dll
C:\Users\bruno\Documents\Github\ViaCep\ViaCepTest\bin\Debug\ViaCepTest.pdb
C:\Users\bruno\Documents\Github\ViaCep\ViaCepTest\bin\Debug\Microsoft.VisualStudio.CodeCoverage.Shim.dll
C:\Users\bruno\Documents\Github\ViaCep\ViaCepTest\bin\Debug\MosaicoSolutions.ViaCep.dll
C:\Users\bruno\Documents\Github\ViaCep\ViaCepTest\bin\Debug\Rhino.Mocks.dll
C:\Users\bruno\Documents\Github\ViaCep\ViaCepTest\bin\Debug\MosaicoSolutions.ViaCep.pdb
C:\Users\bruno\Documents\Github\ViaCep\ViaCepTest\bin\Debug\Newtonsoft.Json.xml
C:\Users\bruno\Documents\Github\ViaCep\ViaCepTest\bin\Debug\nunit.framework.xml
C:\Users\bruno\Documents\Github\ViaCep\ViaCepTest\bin\Debug\Rhino.Mocks.xml
C:\Users\bruno\Documents\Github\ViaCep\ViaCepTest\obj\Debug\ViaCepTest.csprojAssemblyReference.cache
C:\Users\bruno\Documents\Github\ViaCep\ViaCepTest\obj\Debug\ViaCepTest.csproj.CoreCompileInputs.cache
C:\Users\bruno\Documents\Github\ViaCep\ViaCepTest\obj\Debug\ViaCepTest.csproj.CopyComplete
C:\Users\bruno\Documents\Github\ViaCep\ViaCepTest\obj\Debug\ViaCepTest.dll
C:\Users\bruno\Documents\Github\ViaCep\ViaCepTest\obj\Debug\ViaCepTest.pdb
Binary file modified ViaCepTest/obj/Debug/ViaCepTest.dll
Binary file not shown.
Binary file modified ViaCepTest/obj/Debug/ViaCepTest.pdb
Binary file not shown.
3 changes: 3 additions & 0 deletions ViaCepTest/packages.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.CodeCoverage" version="16.3.0" targetFramework="net472" />
<package id="Microsoft.NET.Test.Sdk" version="16.3.0" targetFramework="net472" />
<package id="Newtonsoft.Json" version="12.0.1" targetFramework="net472" />
<package id="NUnit" version="3.11.0" targetFramework="net472" />
<package id="NUnit3TestAdapter" version="3.15.1" targetFramework="net472" />
<package id="RhinoMocks" version="3.6.1" targetFramework="net45" />
</packages>
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
<CodeCoverage>

<!--
The communication timeout between the logger and its clients in miliseconds (minimum value is 10 seconds).
-->
<CommunicationTimeout>30000</CommunicationTimeout>

<!--
Determines if data should be collected from child processes. If this value is false, data will only be collected from the process created by the logger.
This should be set to true for Silverlight collection because most web browsers create multiple processes.
-->
<CollectFromChildProcesses>true</CollectFromChildProcesses>

<!--
Determines if managed instrumentation is verifiable. If false, managed instrumentation will not be verifiable, but data collection will perform better.
Unverifiable instrumentation will cause an exception if the code does not have the unverifiable code permission.
This value must be true for Silverlight and other "less-than-full trust" applications.
Only set this value to false if you are observing collection-related performance problems on a full-trust application.
-->
<UseVerifiableInstrumentation>true</UseVerifiableInstrumentation>

<!--
Determines if low integrity processes (such as "protected mode" IE8) can connect to the logger.
Only enable this setting if you trust the code running in the low integrity process.
-->
<AllowLowIntegrityProcesses>true</AllowLowIntegrityProcesses>

<!--
Determines if auto-generated modules should be included for code coverage. Code for these modules is generated on the fly by the compiler.
and the modules are tagged with a compilergenerated assembly attribute. Modules generated by ASP.NET for web pages(.aspx) come under this category.
-->
<ExcludeCompilerAutoGeneratedModules>true</ExcludeCompilerAutoGeneratedModules>

<!--
The list of additional users allowed to connect to the logger. The logger process owner will always be an allowed user.
-->
<AllowedUsers />

<!--
Additional paths to search for symbol files. Symbols must be found for modules to be instrumented.
-->
<SymbolSearchPaths />

<!--
About include/exclude lists:
Empty "Include" clauses imply all; empty "Exclude" clauses imply none.
Each element in the list is a regular expression (ECMAScript syntax).
An item must first match at least one entry in the include list to be included.
Included items must then not match any entries in the exclude list to remain included.
It is considered an error to exclude all items from instrumentation as no data would be collected.
-->

<!--
The module include/exclude list by the full path from where the module loaded.
Entries in this list are case-insensitive.
-->
<ModulePaths />

<!--
The company name include/exclude list. This is matched against the company name in a module's version information.
Entries in this list are case-insensitive.
-->
<CompanyNames>
<Exclude>
<!-- Exclude all modules with "microsoft" in the company name. -->
<CompanyName>.*microsoft.*</CompanyName>
</Exclude>
</CompanyNames>

<!--
The module public key token include/exclude list.
For native modules, the public key token is derived from the signing certificate's thumbprint.
Entries in this list are case-insensitive.
-->
<PublicKeyTokens>
<Exclude>
<!-- Microsoft public key token -->
<PublicKeyToken>^B77A5C561934E089$</PublicKeyToken>
<PublicKeyToken>^B03F5F7F11D50A3A$</PublicKeyToken>
<PublicKeyToken>^31BF3856AD364E35$</PublicKeyToken>
<PublicKeyToken>^89845DCD8080CC91$</PublicKeyToken>
<PublicKeyToken>^71E9BCE111E9429C$</PublicKeyToken>
<PublicKeyToken>^8F50407C4E9E73B6$</PublicKeyToken>
<PublicKeyToken>^E361AF139669C375$</PublicKeyToken>
</Exclude>
</PublicKeyTokens>

<!--
The source file path include/exclude list. This is matched against source information in a .pdb.
Entries in this list are case-insensitive.
-->
<Sources>
<Exclude>
<!-- Exclude files from ATL/MFC -->
<Source>.*\\atlmfc\\.*</Source>
<!-- Exclude files from the CRT -->
<Source>.*\\vctools\\.*</Source>
<!-- Exclude files from Microsoft's SDKs -->
<Source>.*\\public\\sdk\\.*</Source>
<Source>.*\\externalapis\\.*</Source>
<Source>.*\\microsoft sdks\\.*</Source>
<!-- Exclude files from VC++'s include directory -->
<Source>.*\\vc\\include\\.*</Source>
<Source>.*\\msclr\\.*</Source>
<Source>.*\\ucrt\\.*</Source>
</Exclude>
</Sources>

<!--
The attributes include/exclude list. This is matched against a managed method's attributes.
The attributes are also checked on the method's type and the type's outter type, if the type is a nested type.
Entries in this list are case-sensitive attribute type names.
-->
<Attributes>
<Exclude>
<Attribute>^System.Diagnostics.DebuggerHiddenAttribute$</Attribute>
<Attribute>^System.Diagnostics.DebuggerNonUserCodeAttribute$</Attribute>
<Attribute>^System.Runtime.CompilerServices.CompilerGeneratedAttribute$</Attribute>
<Attribute>^System.CodeDom.Compiler.GeneratedCodeAttribute$</Attribute>
<Attribute>^System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute$</Attribute>
</Exclude>
</Attributes>

<!--
The function name include/exclude list.
Entries in this list are case-sensitive.
-->
<Functions>
<Exclude>
<!-- Exclude symbols in the C++ std namespace -->
<Function>^std::.*</Function>
<!-- Exclude symbols in the ATL namespace -->
<Function>^ATL::.*</Function>
<!-- Exclude TEST_METHOD macro -->
<Function>.*::__GetTestMethodInfo.*</Function>
<!-- Exclude compiler generated entry point -->
<Function>.*__CxxPureMSILEntry.*</Function>
<!-- Exclude symbols in the code coverage namespace -->
<Function>^Microsoft::VisualStudio::CppCodeCoverageFramework::.*</Function>
<!-- Exclude symbols in the unit test namespace -->
<Function>^Microsoft::VisualStudio::CppUnitTestFramework::.*</Function>
<!-- Exclude functions related to CPPUnitTest macros -->
<Function>.*::YOU_CAN_ONLY_DESIGNATE_ONE_.*</Function>
<!-- Exclude internal c functions -->
<Function>^__.*</Function>
<!-- Exclude internal cpp functions -->
<Function>.*::__.*</Function>
</Exclude>
</Functions>

</CodeCoverage>
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!--
***********************************************************************************************
Microsoft.CodeCoverage.props
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<TraceDataCollectorDirectoryPath>$(MSBuildThisFileDirectory)</TraceDataCollectorDirectoryPath>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!--
***********************************************************************************************
Microsoft.CodeCoverage.targets
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your test projects from the command-line or the IDE.
Copyright (c) Microsoft. All rights reserved.
***********************************************************************************************
-->

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<!-- This target required to enable /collect:"Code Coverage" in "dotnet publish" scenario with "dotnet vstest".
E.g: Release pipelines where user/project nuget cache not available on current machine. -->
<Target Name="CopyTraceDataCollectorArtifacts" AfterTargets="ComputeFilesToPublish">

<ItemGroup>
<TraceDataCollectorArtifacts Include="$(MSBuildThisFileDirectory)\**\*.*" />
</ItemGroup>

<Copy SourceFiles="@(TraceDataCollectorArtifacts)" DestinationFolder="$(PublishDir)%(RecursiveDir)" />

</Target>
</Project>
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!--
***********************************************************************************************
Microsoft.NET.Test.Sdk.props
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<PropertyGroup>
<IsTestProject>true</IsTestProject>
</PropertyGroup>

<ItemGroup>
<ProjectCapability Include="TestContainer" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!--
***********************************************************************************************
Microsoft.NET.Test.Sdk.targets
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<!--
Generate config file for test project targeting .NET Framework. This config file has binding redirect which is needed at time of running tests.
Added below two lines because msbuild has following check:
https://github.com/Microsoft/msbuild/blob/dd5e8bc3f86ac98bd77d8971b00a6ad14f122f1a/src/XMakeTasks/Microsoft.Common.CurrentVersion.targets#L2027
-->
<PropertyGroup>
<AutoGenerateBindingRedirects Condition="'$(AutoGenerateBindingRedirects)' == ''">true</AutoGenerateBindingRedirects>
<GenerateBindingRedirectsOutputType Condition="'$(GenerateBindingRedirectsOutputType)' == ''">true</GenerateBindingRedirectsOutputType>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// <auto-generated> This file has been auto generated. </auto-generated>
using System;
[Microsoft.VisualStudio.TestPlatform.TestSDKAutoGeneratedCode]
class AutoGeneratedProgram {static void Main(string[] args){}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// <auto-generated> This file has been auto generated. </auto-generated>
module AutoGeneratedProgram
[<EntryPoint>]
[<Microsoft.VisualStudio.TestPlatform.TestSDKAutoGeneratedCode>]
let main _ = 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
' <auto-generated> This file has been auto generated. </auto-generated>
Imports System
Namespace Global
Module __MicrosoftTestPlatformAutoGeneratedProgram
<Microsoft.VisualStudio.TestPlatform.TestSDKAutoGeneratedCode>
Sub Main(args As String())
End Sub
End Module
End Namespace
Loading

0 comments on commit 237833d

Please sign in to comment.