-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added support for ManagedType and ManagedClass #737
Conversation
Added support for `ManagedType` and `ManagedMethod` into various classes. Also centralized TestPlarform version, and some refactoring.
78ae14f
to
e5ead2f
Compare
src/Adapter/PlatformServices.NetCore/PlatformServices.NetCore.csproj
Outdated
Show resolved
Hide resolved
LGTM with a few minor comments. It's encouraging to see that the addition of the two properties seems to be relatively simple. Of course, we still need to add support for parameter/argument sets. |
5419577
to
bb70540
Compare
49090bc
to
e60d779
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks mostly good, I would review if #if NETCOREAPP1_1 || NETCOREAPP2_1 can be replaced witch check for just netcoreapp to help us in the future if we need to multitarget this further.
function Sync-PackageVersions { | ||
$versionsFile = "$PSScriptRoot\build\TestFx.Versions.targets" | ||
|
||
$versionsRegex = '(?mi)<(TestPlatformVersion.*?)>(.*?)<\/TestPlatformVersion>' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Not sure what the ?mi option would do here. It is definitely case insensitive by default ( -split and -isplit is case insensitive, -csplit is case sensitive). And you are passing the whole file as one string (you used -Raw). If you have a strong reason I would like to know to learn.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In some (like test/E2ETests/Automation.CLI/packages.config) files we reference more than one package, this is to catch all references and update those.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like that is the default behavior of -replace
:
PS > Get-Content ~/Desktop/abc.txt
abc
abc abcabc
abc
PS > (Get-Content ~/Desktop/abc.txt -Raw) -replace "abc", "ggg"
ggg
ggg gggggg
ggg
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll have another PR after this and move to use PackageReference
instead of "NuGet.config" files. With that PR, I'll remove this logic too.
test/UnitTests/MSTest.CoreAdapter.TestUtilities/ActionUtility.cs
Outdated
Show resolved
Hide resolved
|
||
if (this.TestMethod.HasManagedMethodAndType) | ||
{ | ||
testCase = new TestCase(fullName, this.TestMethod.ManagedType, this.TestMethod.ManagedMethod, TestAdapter.Constants.ExecutorUri, this.TestMethod.AssemblyName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Haplois Won't this fail If the version of mstest adapter that includes the current FQN changes is loaded in VS 2017 where the TP OM that will be loaded will not contain this TestCase
constructor?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will fail. I am moving these changes to a separate assembly and NuGet package. I'll have a PR soon.
microsoft/vstest#2611 needs to be merged, and published into the package repository before merging this PR.