1 write to _fakeStructureRoot
Microsoft.Build.Utilities.UnitTests (1)
ToolLocationHelper_Tests.cs (1)
2930
_fakeStructureRoot
= MakeFakeSDKStructure();
42 references to _fakeStructureRoot
Microsoft.Build.Utilities.UnitTests (42)
ToolLocationHelper_Tests.cs (42)
2938
if (
_fakeStructureRoot
!= null)
2940
if (FileUtilities.DirectoryExistsNoThrow(
_fakeStructureRoot
))
2942
FileUtilities.DeleteDirectoryNoThrow(
_fakeStructureRoot
, true);
2987
IDictionary<string, string> sdks = ToolLocationHelper.GetPlatformExtensionSDKLocations(new[] {
_fakeStructureRoot
}, null, "FOO", new Version(1, 0));
2991
sdks = ToolLocationHelper.GetPlatformExtensionSDKLocations(new[] {
_fakeStructureRoot
}, null, "MyPlatform", new Version(3, 0));
2996
sdks = ToolLocationHelper.GetPlatformExtensionSDKLocations(new[] {
_fakeStructureRoot
}, null, "MyPlatform", new Version(4, 0));
2998
sdks["MyAssembly, Version=1.0"].ShouldBe(Path.Combine(
_fakeStructureRoot
, "MyPlatform", "3.0", "ExtensionSDKs", "MyAssembly", "1.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3000
sdks["AnotherAssembly, Version=1.0"].ShouldBe(Path.Combine(
_fakeStructureRoot
, "MyPlatform", "4.0", "ExtensionSDKs", "AnotherAssembly", "1.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3004
sdks = ToolLocationHelper.GetPlatformExtensionSDKLocations(new[] {
_fakeStructureRoot
}, null, "MyPlatform", new Version(1, 0));
3024
IDictionary<string, string> sdks = ToolLocationHelper.GetPlatformExtensionSDKLocations(new[] {
_fakeStructureRoot
}, null, "FOO", new Version(1, 0));
3028
Path.Combine(
_fakeStructureRoot
, "MyPlatform", "3.0", "ExtensionSDKs", "MyAssembly", "1.0")
3036
new[] {
_fakeStructureRoot
},
3045
new[] {
_fakeStructureRoot
},
3050
path = ToolLocationHelper.GetPlatformExtensionSDKLocation("Something, Version=1.0", "MyPlatform", new Version(4, 0), new[] {
_fakeStructureRoot
}, null);
3475
IList<TargetPlatformSDK> sdkList = ToolLocationHelper.GetTargetPlatformSdks(new[] {
_fakeStructureRoot
}, null);
3519
IDictionary<string, string> extensionSDKs = ToolLocationHelper.GetPlatformExtensionSDKLocations(new[] {
_fakeStructureRoot
}, null, "MyPlatform", new Version(4, 0));
3781
var paths = new List<string> {
_fakeStructureRoot
, _fakeStructureRoot2 };
3789
targetPlatforms[key].Path.ShouldBe(Path.Combine(
_fakeStructureRoot
, "Windows", "1.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3790
targetPlatforms[key].ExtensionSDKs["MyAssembly, Version=1.0"].ShouldBe(Path.Combine(
_fakeStructureRoot
, "Windows", "v1.0", "ExtensionSDKs", "MyAssembly", "1.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3792
targetPlatforms[key].ExtensionSDKs["MyAssembly, Version=2.0"].ShouldBe(Path.Combine(
_fakeStructureRoot
, "Windows", "1.0", "ExtensionSDKs", "MyAssembly", "2.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3796
targetPlatforms[key].Path.ShouldBe(Path.Combine(
_fakeStructureRoot
, "Windows", "2.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3798
targetPlatforms[key].ExtensionSDKs["MyAssembly, Version=3.0"].ShouldBe(Path.Combine(
_fakeStructureRoot
, "Windows", "2.0", "ExtensionSDKs", "MyAssembly", "3.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3810
targetPlatforms[key].ExtensionSDKs["AnotherAssembly, Version=1.0"].ShouldBe(Path.Combine(
_fakeStructureRoot
, "MyPlatform", "4.0", "ExtensionSDKs", "AnotherAssembly", "1.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3814
targetPlatforms[key].Path.ShouldBe(Path.Combine(
_fakeStructureRoot
, "MyPlatform", "3.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3816
targetPlatforms[key].ExtensionSDKs["MyAssembly, Version=1.0"].ShouldBe(Path.Combine(
_fakeStructureRoot
, "MyPlatform", "3.0", "ExtensionSDKs", "MyAssembly", "1.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3820
targetPlatforms[key].Path.ShouldBe(Path.Combine(
_fakeStructureRoot
, "MyPlatform", "2.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3822
targetPlatforms[key].ExtensionSDKs["MyAssembly, Version=1.0"].ShouldBe(Path.Combine(
_fakeStructureRoot
, "MyPlatform", "2.0", "ExtensionSDKs", "MyAssembly", "1.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3825
targetPlatforms[key].Path.ShouldBe(Path.Combine(
_fakeStructureRoot
, "MyPlatform", "1.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3829
targetPlatforms[key].Path.ShouldBe(Path.Combine(
_fakeStructureRoot
, "MyPlatform", "8.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3833
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);
3838
targetPlatforms[key].Path.ShouldBe(Path.Combine(
_fakeStructureRoot
, "MyPlatform", "9.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3842
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);
4002
IEnumerable<string> myPlatforms = ToolLocationHelper.GetPlatformsForSDK("MyPlatform", new Version("8.0"), new[] {
_fakeStructureRoot
}, null);
4015
ToolLocationHelper.GetPlatformsForSDK("DoesNotExistPlatform", new Version("0.0.0.0"), new[] {
_fakeStructureRoot
}, null).Any().ShouldBeFalse();
4025
ToolLocationHelper.GetPlatformsForSDK("MyPlatform", new Version("0.0.0.0"), new[] {
_fakeStructureRoot
}, null).Any().ShouldBeFalse();
4035
ToolLocationHelper.GetPlatformsForSDK("Windows", new Version("8.0"), new[] {
_fakeStructureRoot
}, null).Any().ShouldBeFalse();
4049
IList<TargetPlatformSDK> sdks = ToolLocationHelper.GetTargetPlatformSdks(new[] {
_fakeStructureRoot
}, null);
4058
targetPlatforms[key].Path.ShouldBe(Path.Combine(
_fakeStructureRoot
, "Windows", "1.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
4061
targetPlatforms[key].Path.ShouldBe(Path.Combine(
_fakeStructureRoot
, "Windows", "2.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
4064
targetPlatforms[key].Path.ShouldBe(Path.Combine(
_fakeStructureRoot
, "MyPlatform", "3.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
4067
targetPlatforms[key].Path.ShouldBe(Path.Combine(
_fakeStructureRoot
, "MyPlatform", "2.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
4070
targetPlatforms[key].Path.ShouldBe(Path.Combine(
_fakeStructureRoot
, "MyPlatform", "1.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);