-
Notifications
You must be signed in to change notification settings - Fork 635
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use existing library function to lookup previous name hints (#11379)
* use existing library function to lookup previous name hints * modify test migration xml to assert case works with no parameters * add new test add migration xml to ffitarget change method name in lib services * add one more test case for overload * add missing dll to migration test framework * Update ClassWithMigratedMembers.cs Co-authored-by: michael kirschner <[email protected]>
- Loading branch information
1 parent
9cf6acf
commit f78cf1b
Showing
10 changed files
with
539 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace FFITarget | ||
{ | ||
public class ClassWithMigratedMembers | ||
{ | ||
|
||
public static ClassWithMigratedMembers ByNothing() | ||
{ | ||
return new ClassWithMigratedMembers(); | ||
} | ||
|
||
//we test by opening a file that references a node with three params | ||
public string AMemberWithTwoParams(string a, string b) | ||
{ | ||
return a + b; | ||
} | ||
public string AMemberWithThreeParams(string a, string b,string c ="abc") | ||
{ | ||
return "migrated"; | ||
} | ||
public string AnOverloadedMember(string a, string b) | ||
{ | ||
return "original"; | ||
} | ||
public string AnOverloadedMember(string a, string b, string c = "abc") | ||
{ | ||
return "migrated"; | ||
} | ||
|
||
//we test a file that uses the node AMemberWithAChangedName1 | ||
public string AMemberWithAChangedName2(string a) | ||
{ | ||
return a; | ||
} | ||
/* public string AMemberWithAChangedName1(string a) | ||
{ | ||
return a; | ||
}*/ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0"?> | ||
<migrations> | ||
<priorNameHint> | ||
<oldName>FFITarget.ClassWithMigratedMembers.AMemberWithAChangedName1</oldName> | ||
<newName>FFITarget.ClassWithMigratedMembers.AMemberWithAChangedName2</newName> | ||
</priorNameHint> | ||
<priorNameHint> | ||
<oldName>FFITarget.ClassWithMigratedMembers.AMemberWithTwoParams@string,string</oldName> | ||
<newName>FFITarget.ClassWithMigratedMembers.AMemberWithThreeParams@string,string,string</newName> | ||
</priorNameHint> | ||
<priorNameHint> | ||
<oldName>FFITarget.ClassWithMigratedMembers.AnOverloadedMember@string,string</oldName> | ||
<newName>FFITarget.ClassWithMigratedMembers.AnOverloadedMember@string,string,string</newName> | ||
</priorNameHint> | ||
</migrations> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.