1 write to _fakeStructureRoot
Microsoft.Build.Utilities.UnitTests (1)
ToolLocationHelper_Tests.cs (1)
2929
_fakeStructureRoot
= MakeFakeSDKStructure();
42 references to _fakeStructureRoot
Microsoft.Build.Utilities.UnitTests (42)
ToolLocationHelper_Tests.cs (42)
2937
if (
_fakeStructureRoot
!= null)
2939
if (FileUtilities.DirectoryExistsNoThrow(
_fakeStructureRoot
))
2941
FileUtilities.DeleteDirectoryNoThrow(
_fakeStructureRoot
, true);
2986
IDictionary<string, string> sdks = ToolLocationHelper.GetPlatformExtensionSDKLocations(new[] {
_fakeStructureRoot
}, null, "FOO", new Version(1, 0));
2990
sdks = ToolLocationHelper.GetPlatformExtensionSDKLocations(new[] {
_fakeStructureRoot
}, null, "MyPlatform", new Version(3, 0));
2995
sdks = ToolLocationHelper.GetPlatformExtensionSDKLocations(new[] {
_fakeStructureRoot
}, null, "MyPlatform", new Version(4, 0));
2997
sdks["MyAssembly, Version=1.0"].ShouldBe(Path.Combine(
_fakeStructureRoot
, "MyPlatform", "3.0", "ExtensionSDKs", "MyAssembly", "1.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
2999
sdks["AnotherAssembly, Version=1.0"].ShouldBe(Path.Combine(
_fakeStructureRoot
, "MyPlatform", "4.0", "ExtensionSDKs", "AnotherAssembly", "1.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3003
sdks = ToolLocationHelper.GetPlatformExtensionSDKLocations(new[] {
_fakeStructureRoot
}, null, "MyPlatform", new Version(1, 0));
3023
IDictionary<string, string> sdks = ToolLocationHelper.GetPlatformExtensionSDKLocations(new[] {
_fakeStructureRoot
}, null, "FOO", new Version(1, 0));
3027
Path.Combine(
_fakeStructureRoot
, "MyPlatform", "3.0", "ExtensionSDKs", "MyAssembly", "1.0")
3035
new[] {
_fakeStructureRoot
},
3044
new[] {
_fakeStructureRoot
},
3049
path = ToolLocationHelper.GetPlatformExtensionSDKLocation("Something, Version=1.0", "MyPlatform", new Version(4, 0), new[] {
_fakeStructureRoot
}, null);
3474
IList<TargetPlatformSDK> sdkList = ToolLocationHelper.GetTargetPlatformSdks(new[] {
_fakeStructureRoot
}, null);
3518
IDictionary<string, string> extensionSDKs = ToolLocationHelper.GetPlatformExtensionSDKLocations(new[] {
_fakeStructureRoot
}, null, "MyPlatform", new Version(4, 0));
3780
var paths = new List<string> {
_fakeStructureRoot
, _fakeStructureRoot2 };
3788
targetPlatforms[key].Path.ShouldBe(Path.Combine(
_fakeStructureRoot
, "Windows", "1.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3789
targetPlatforms[key].ExtensionSDKs["MyAssembly, Version=1.0"].ShouldBe(Path.Combine(
_fakeStructureRoot
, "Windows", "v1.0", "ExtensionSDKs", "MyAssembly", "1.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3791
targetPlatforms[key].ExtensionSDKs["MyAssembly, Version=2.0"].ShouldBe(Path.Combine(
_fakeStructureRoot
, "Windows", "1.0", "ExtensionSDKs", "MyAssembly", "2.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3795
targetPlatforms[key].Path.ShouldBe(Path.Combine(
_fakeStructureRoot
, "Windows", "2.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3797
targetPlatforms[key].ExtensionSDKs["MyAssembly, Version=3.0"].ShouldBe(Path.Combine(
_fakeStructureRoot
, "Windows", "2.0", "ExtensionSDKs", "MyAssembly", "3.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3809
targetPlatforms[key].ExtensionSDKs["AnotherAssembly, Version=1.0"].ShouldBe(Path.Combine(
_fakeStructureRoot
, "MyPlatform", "4.0", "ExtensionSDKs", "AnotherAssembly", "1.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3813
targetPlatforms[key].Path.ShouldBe(Path.Combine(
_fakeStructureRoot
, "MyPlatform", "3.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3815
targetPlatforms[key].ExtensionSDKs["MyAssembly, Version=1.0"].ShouldBe(Path.Combine(
_fakeStructureRoot
, "MyPlatform", "3.0", "ExtensionSDKs", "MyAssembly", "1.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3819
targetPlatforms[key].Path.ShouldBe(Path.Combine(
_fakeStructureRoot
, "MyPlatform", "2.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3821
targetPlatforms[key].ExtensionSDKs["MyAssembly, Version=1.0"].ShouldBe(Path.Combine(
_fakeStructureRoot
, "MyPlatform", "2.0", "ExtensionSDKs", "MyAssembly", "1.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3824
targetPlatforms[key].Path.ShouldBe(Path.Combine(
_fakeStructureRoot
, "MyPlatform", "1.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3828
targetPlatforms[key].Path.ShouldBe(Path.Combine(
_fakeStructureRoot
, "MyPlatform", "8.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3832
targetPlatforms[key].Platforms["PlatformAssembly, Version=0.1.2.3"].ShouldBe(Path.Combine(
_fakeStructureRoot
, "MyPlatform", "8.0", "Platforms", "PlatformAssembly", "0.1.2.3") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3837
targetPlatforms[key].Path.ShouldBe(Path.Combine(
_fakeStructureRoot
, "MyPlatform", "9.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3841
targetPlatforms[key].Platforms["PlatformAssembly, Version=0.1.2.3"].ShouldBe(Path.Combine(
_fakeStructureRoot
, "MyPlatform", "9.0", "Platforms", "PlatformAssembly", "0.1.2.3") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
4001
IEnumerable<string> myPlatforms = ToolLocationHelper.GetPlatformsForSDK("MyPlatform", new Version("8.0"), new[] {
_fakeStructureRoot
}, null);
4014
ToolLocationHelper.GetPlatformsForSDK("DoesNotExistPlatform", new Version("0.0.0.0"), new[] {
_fakeStructureRoot
}, null).Any().ShouldBeFalse();
4024
ToolLocationHelper.GetPlatformsForSDK("MyPlatform", new Version("0.0.0.0"), new[] {
_fakeStructureRoot
}, null).Any().ShouldBeFalse();
4034
ToolLocationHelper.GetPlatformsForSDK("Windows", new Version("8.0"), new[] {
_fakeStructureRoot
}, null).Any().ShouldBeFalse();
4048
IList<TargetPlatformSDK> sdks = ToolLocationHelper.GetTargetPlatformSdks(new[] {
_fakeStructureRoot
}, null);
4057
targetPlatforms[key].Path.ShouldBe(Path.Combine(
_fakeStructureRoot
, "Windows", "1.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
4060
targetPlatforms[key].Path.ShouldBe(Path.Combine(
_fakeStructureRoot
, "Windows", "2.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
4063
targetPlatforms[key].Path.ShouldBe(Path.Combine(
_fakeStructureRoot
, "MyPlatform", "3.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
4066
targetPlatforms[key].Path.ShouldBe(Path.Combine(
_fakeStructureRoot
, "MyPlatform", "2.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
4069
targetPlatforms[key].Path.ShouldBe(Path.Combine(
_fakeStructureRoot
, "MyPlatform", "1.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);