1 write to _fakeStructureRoot
Microsoft.Build.Utilities.UnitTests (1)
ToolLocationHelper_Tests.cs (1)
2936
_fakeStructureRoot
= MakeFakeSDKStructure();
42 references to _fakeStructureRoot
Microsoft.Build.Utilities.UnitTests (42)
ToolLocationHelper_Tests.cs (42)
2944
if (
_fakeStructureRoot
!= null)
2946
if (FileUtilities.DirectoryExistsNoThrow(
_fakeStructureRoot
))
2948
FileUtilities.DeleteDirectoryNoThrow(
_fakeStructureRoot
, true);
2993
IDictionary<string, string> sdks = ToolLocationHelper.GetPlatformExtensionSDKLocations(new[] {
_fakeStructureRoot
}, null, "FOO", new Version(1, 0));
2997
sdks = ToolLocationHelper.GetPlatformExtensionSDKLocations(new[] {
_fakeStructureRoot
}, null, "MyPlatform", new Version(3, 0));
3002
sdks = ToolLocationHelper.GetPlatformExtensionSDKLocations(new[] {
_fakeStructureRoot
}, null, "MyPlatform", new Version(4, 0));
3004
sdks["MyAssembly, Version=1.0"].ShouldBe(Path.Combine(
_fakeStructureRoot
, "MyPlatform", "3.0", "ExtensionSDKs", "MyAssembly", "1.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3006
sdks["AnotherAssembly, Version=1.0"].ShouldBe(Path.Combine(
_fakeStructureRoot
, "MyPlatform", "4.0", "ExtensionSDKs", "AnotherAssembly", "1.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3010
sdks = ToolLocationHelper.GetPlatformExtensionSDKLocations(new[] {
_fakeStructureRoot
}, null, "MyPlatform", new Version(1, 0));
3030
IDictionary<string, string> sdks = ToolLocationHelper.GetPlatformExtensionSDKLocations(new[] {
_fakeStructureRoot
}, null, "FOO", new Version(1, 0));
3034
Path.Combine(
_fakeStructureRoot
, "MyPlatform", "3.0", "ExtensionSDKs", "MyAssembly", "1.0")
3042
new[] {
_fakeStructureRoot
},
3051
new[] {
_fakeStructureRoot
},
3056
path = ToolLocationHelper.GetPlatformExtensionSDKLocation("Something, Version=1.0", "MyPlatform", new Version(4, 0), new[] {
_fakeStructureRoot
}, null);
3481
IList<TargetPlatformSDK> sdkList = ToolLocationHelper.GetTargetPlatformSdks(new[] {
_fakeStructureRoot
}, null);
3525
IDictionary<string, string> extensionSDKs = ToolLocationHelper.GetPlatformExtensionSDKLocations(new[] {
_fakeStructureRoot
}, null, "MyPlatform", new Version(4, 0));
3787
var paths = new List<string> {
_fakeStructureRoot
, _fakeStructureRoot2 };
3795
targetPlatforms[key].Path.ShouldBe(Path.Combine(
_fakeStructureRoot
, "Windows", "1.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3796
targetPlatforms[key].ExtensionSDKs["MyAssembly, Version=1.0"].ShouldBe(Path.Combine(
_fakeStructureRoot
, "Windows", "v1.0", "ExtensionSDKs", "MyAssembly", "1.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3798
targetPlatforms[key].ExtensionSDKs["MyAssembly, Version=2.0"].ShouldBe(Path.Combine(
_fakeStructureRoot
, "Windows", "1.0", "ExtensionSDKs", "MyAssembly", "2.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3802
targetPlatforms[key].Path.ShouldBe(Path.Combine(
_fakeStructureRoot
, "Windows", "2.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3804
targetPlatforms[key].ExtensionSDKs["MyAssembly, Version=3.0"].ShouldBe(Path.Combine(
_fakeStructureRoot
, "Windows", "2.0", "ExtensionSDKs", "MyAssembly", "3.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3816
targetPlatforms[key].ExtensionSDKs["AnotherAssembly, Version=1.0"].ShouldBe(Path.Combine(
_fakeStructureRoot
, "MyPlatform", "4.0", "ExtensionSDKs", "AnotherAssembly", "1.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3820
targetPlatforms[key].Path.ShouldBe(Path.Combine(
_fakeStructureRoot
, "MyPlatform", "3.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3822
targetPlatforms[key].ExtensionSDKs["MyAssembly, Version=1.0"].ShouldBe(Path.Combine(
_fakeStructureRoot
, "MyPlatform", "3.0", "ExtensionSDKs", "MyAssembly", "1.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3826
targetPlatforms[key].Path.ShouldBe(Path.Combine(
_fakeStructureRoot
, "MyPlatform", "2.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3828
targetPlatforms[key].ExtensionSDKs["MyAssembly, Version=1.0"].ShouldBe(Path.Combine(
_fakeStructureRoot
, "MyPlatform", "2.0", "ExtensionSDKs", "MyAssembly", "1.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3831
targetPlatforms[key].Path.ShouldBe(Path.Combine(
_fakeStructureRoot
, "MyPlatform", "1.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3835
targetPlatforms[key].Path.ShouldBe(Path.Combine(
_fakeStructureRoot
, "MyPlatform", "8.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3839
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);
3844
targetPlatforms[key].Path.ShouldBe(Path.Combine(
_fakeStructureRoot
, "MyPlatform", "9.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3848
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);
4008
IEnumerable<string> myPlatforms = ToolLocationHelper.GetPlatformsForSDK("MyPlatform", new Version("8.0"), new[] {
_fakeStructureRoot
}, null);
4021
ToolLocationHelper.GetPlatformsForSDK("DoesNotExistPlatform", new Version("0.0.0.0"), new[] {
_fakeStructureRoot
}, null).Any().ShouldBeFalse();
4031
ToolLocationHelper.GetPlatformsForSDK("MyPlatform", new Version("0.0.0.0"), new[] {
_fakeStructureRoot
}, null).Any().ShouldBeFalse();
4041
ToolLocationHelper.GetPlatformsForSDK("Windows", new Version("8.0"), new[] {
_fakeStructureRoot
}, null).Any().ShouldBeFalse();
4055
IList<TargetPlatformSDK> sdks = ToolLocationHelper.GetTargetPlatformSdks(new[] {
_fakeStructureRoot
}, null);
4064
targetPlatforms[key].Path.ShouldBe(Path.Combine(
_fakeStructureRoot
, "Windows", "1.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
4067
targetPlatforms[key].Path.ShouldBe(Path.Combine(
_fakeStructureRoot
, "Windows", "2.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
4070
targetPlatforms[key].Path.ShouldBe(Path.Combine(
_fakeStructureRoot
, "MyPlatform", "3.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
4073
targetPlatforms[key].Path.ShouldBe(Path.Combine(
_fakeStructureRoot
, "MyPlatform", "2.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
4076
targetPlatforms[key].Path.ShouldBe(Path.Combine(
_fakeStructureRoot
, "MyPlatform", "1.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);