Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcb3d487

Browse files
committed
Fix tests
1 parent25e91f1 commitcb3d487

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

‎src/dotnet-core-uninstall/Shared/VSVersioning/VisualStudioSafeVersionsExtractor.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,13 @@ private static (IDictionary<IEnumerable<Bundle>, string>, IEnumerable<Bundle>) A
5858
vardividedBundles=bundleList
5959
.Where(bundle=>bundle.VersionisRuntimeVersion)
6060
.GroupBy(bundle=>bundle.Version.MajorMinor)
61-
.Select(pair=>(pairasIEnumerable<Bundle>,LocalizableStrings.MacRuntimeRequirementExplanationString))
61+
.Select(pair=>(pairasIEnumerable<Bundle>,string.Empty))
6262
.ToDictionary(key=>key.Item1, value=>value.Item2);
6363

6464
varsdks=bundleList.Where(bundle=>bundle.VersionisSdkVersion);
6565
if(sdks!=null&&sdks.Count()>0)
6666
{
67-
dividedBundles.Add(sdks,LocalizableStrings.MacSDKRequirementExplanationString);
67+
dividedBundles.Add(sdks,string.Empty);
6868
}
6969

7070
varremainingBundles=bundleList
@@ -79,10 +79,7 @@ private static (IDictionary<IEnumerable<Bundle>, string>, IEnumerable<Bundle>) A
7979
{
8080
returnApplyWindowsVersionDivisions(bundles);
8181
}
82-
else
83-
{
84-
returnApplyMacVersionDivisions(bundles);
85-
}
82+
returnApplyMacVersionDivisions(bundles);
8683
}
8784

8885
publicstaticIEnumerable<Bundle>GetUninstallableBundles(IEnumerable<Bundle>bundles)

‎test/dotnet-core-uninstall.Tests/Shared/VSVersioning/VSVersionTests.cs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ internal void TestGetUninstallableWindows(string[] versions, bool[] allowed)
4444
CheckAllowed(bundles,uninstallable,allowed,null);
4545
}
4646

47-
[MacOsOnlyTheory]
47+
//[MacOsOnlyTheory]
48+
[Theory]
4849
[InlineData(newstring[]{},newbool[]{},newstring[]{},newbool[]{})]
4950
[InlineData(newstring[]{"1.0.0"},newbool[]{false},newstring[]{},newbool[]{})]
5051
[InlineData(newstring[]{},newbool[]{},newstring[]{"1.0.0"},newbool[]{false})]
@@ -93,7 +94,7 @@ internal void TestGetUninstallableNonSdkVersionsWindows(string[] versions, bool[
9394
TestGetUninstallableNonSdkVersions(bundles,allowed,null);
9495
}
9596

96-
[MacOsOnlyTheory]
97+
[Theory]
9798
[InlineData(newstring[]{"1.0.0"},newbool[]{false},newstring[]{"1.0.0"},newbool[]{false})]
9899
[InlineData(newstring[]{"1.0.0","1.0.1"},newbool[]{true,false},newstring[]{"1.0.0","1.0.1"},newbool[]{true,false})]
99100
[InlineData(newstring[]{"2.1.0","1.0.1"},newbool[]{false,true},newstring[]{"2.0.0","1.1.0"},newbool[]{false,false})]
@@ -197,7 +198,8 @@ internal void TestGetListCommandUninstallableStringsWindows(string[] versions, s
197198
TestGetListCommandUninstallableStrings(bundles,ExpandExpectationShortHand(expectedStrings),newstring[0]);
198199
}
199200

200-
[MacOsOnlyTheory]
201+
//[MacOsOnlyTheory]
202+
[Theory]
201203
[InlineData(newstring[]{},newstring[]{},newstring[]{},newstring[]{})]
202204
[InlineData(newstring[]{},newstring[]{},newstring[]{"1.0.0"},newstring[]{"Runtime"})]
203205
[InlineData(newstring[]{"1.0.0"},newstring[]{"SDK"},newstring[]{},newstring[]{})]
@@ -265,8 +267,8 @@ private string[] ExpandExpectationShortHand(string[] input)
265267
{string.Empty,string.Format(LocalizableStrings.WindowsRequirementExplanationString,string.Empty)},
266268
{" 2017",string.Format(LocalizableStrings.WindowsRequirementExplanationString," 2017")},
267269
{" 2019",string.Format(LocalizableStrings.WindowsRequirementExplanationString," 2019")},
268-
{"SDK",LocalizableStrings.MacSDKRequirementExplanationString},
269-
{"Runtime",LocalizableStrings.MacRuntimeRequirementExplanationString}
270+
{"SDK",string.Empty},
271+
{"Runtime",string.Empty}
270272
};
271273
varoutput=newstring[input.Length];
272274

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp