85 references to MockElementLocation
Microsoft.Build.Engine.UnitTests (85)
BackEnd\SdkResolverLoader_Tests.cs (10)
47var resolvers = loader.LoadAllResolvers(new MockElementLocation("file")); 78var files = strategy.FindPotentialSdkResolvers(root, new MockElementLocation("file")); 110var resolversFound = loader.FindPotentialSdkResolvers(root, new MockElementLocation("file")); 233var resolversFound = loader.FindPotentialSdkResolvers(root, new MockElementLocation("file")); 259var resolversManifestsFound = loader.FindPotentialSdkResolversManifests(root, new MockElementLocation("file")); 286var ex = Should.Throw<InvalidProjectFileException>(() => loader.FindPotentialSdkResolvers(root, new MockElementLocation("file"))); 302var ex = Should.Throw<InvalidProjectFileException>(() => loader.FindPotentialSdkResolvers(root, new MockElementLocation("file"))); 326var ex = Should.Throw<InvalidProjectFileException>(() => loader.FindPotentialSdkResolvers(root, new MockElementLocation("file"))); 348IReadOnlyList<SdkResolverBase> resolvers = loader.LoadAllResolvers(new MockElementLocation("file")); 388IReadOnlyList<string> resolvers = loader.FindPotentialSdkResolvers(testRoot, new MockElementLocation("file"));
BackEnd\SdkResolverService_Tests.cs (24)
55var result = service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true); 98var result = service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true); 115SdkResolverException e = Should.Throw<SdkResolverException>(() => service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true)); 130var result = service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true); 148new MockElementLocation("file"), 194var result = service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true); 211var result = service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true); 225var result = service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true); 243service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true); 259var result = service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true); 283service.ResolveSdk(submissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true).Path.ShouldBe("resolverpath"); 286service.ResolveSdk(submissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true).Path.ShouldBe(MockSdkResolverWithState.Expected); 300service.ResolveSdk(submissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true).Path.ShouldBe("resolverpath"); 303service.ResolveSdk(submissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true).Path.ShouldBe("resolverpath"); 317service.ResolveSdk(submissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true).Path.ShouldBe("defaultpath"); 367var result = service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true); 373result = service.ResolveSdk(BuildEventContext.InvalidSubmissionId, new SdkReference("foo", "2.0.0", null), _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true); 449var result = service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true); 486var result = service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true); 533var result = service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true); 579var result = service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true); 626_ => service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true)); 659new MockElementLocation("file"), 690new MockElementLocation("file"),
Evaluation\Expander_Tests.cs (1)
3420MockElementLocation mockElementLocation = new MockElementLocation(Path.Combine(ObjectModelHelpers.TempProjectDir, "one", "two", "three", "four", "five", Path.GetRandomFileName()));
Evaluation\ItemSpec_Tests.cs (2)
51var itemSpecFromAbsolute = CreateItemSpecFrom(absoluteSpec, CreateExpander(new Dictionary<string, string[]>()), new MockElementLocation(projectFile)); 52var itemSpecFromRelative = CreateItemSpecFrom("s.cs", CreateExpander(new Dictionary<string, string[]>()), new MockElementLocation(projectFile));
Evaluation\UsedUninitializedProperties_Tests.cs (2)
25IElementLocation location1 = new MockElementLocation("File1"); 26IElementLocation location2 = new MockElementLocation("File2");
Instance\ProjectTaskInstance_Internal_Tests.cs (3)
40{"p1", ("v1", new MockElementLocation("p1")) } 52{"p1", ("v1", new MockElementLocation("p1")) }, 53{"p2", ("v2", new MockElementLocation("p2")) }
TestData\ProjectInstanceTestObjects.cs (43)
23new MockElementLocation($"location{stringCounter}"), 24new MockElementLocation($"conditionLocation{stringCounter}"), 44location: new MockElementLocation($"location{stringCounter}"), 45includeLocation: new MockElementLocation($"include{stringCounter}"), 46excludeLocation: new MockElementLocation($"remove{stringCounter}"), 47removeLocation: new MockElementLocation($"exclude{stringCounter}"), 48matchOnMetadataLocation: new MockElementLocation($"mm{stringCounter}"), 49matchOnMetadataOptionsLocation: new MockElementLocation($"mmo{stringCounter}"), 50keepMetadataLocation: new MockElementLocation($"km{stringCounter}"), 51removeMetadataLocation: new MockElementLocation($"rm{stringCounter}"), 52keepDuplicatesLocation: new MockElementLocation($"kd{stringCounter}"), 53conditionLocation: new MockElementLocation($"cl{stringCounter}"), 65new MockElementLocation($"location{stringCounter}"), 66new MockElementLocation($"condition{stringCounter}")); 78new MockElementLocation($"location{stringCounter}"), 79new MockElementLocation($"conditionLocation{stringCounter}"), 91new MockElementLocation($"location{stringCounter}"), 92new MockElementLocation($"conditionLocation{stringCounter}")); 102new MockElementLocation($"location{stringCounter}"), 103new MockElementLocation($"executeTargetLocation{stringCounter}"), 104new MockElementLocation($"conditionLocation{stringCounter}")); 128new MockElementLocation($"location{stringCounter}"), 129new MockElementLocation($"conditionLocation{stringCounter}"), 130new MockElementLocation($"coeLocation{stringCounter}"), 131new MockElementLocation($"msbrLocation{stringCounter}"), 132new MockElementLocation($"msbaLocation{stringCounter}")); 143new MockElementLocation($"location{stringCounter}"), 144new MockElementLocation($"propertyLocation{stringCounter}"), 145new MockElementLocation($"taskParamLocation{stringCounter}"), 146new MockElementLocation($"conditionLocation{stringCounter}")); 157new MockElementLocation($"location{stringCounter}"), 158new MockElementLocation($"itemLocation{stringCounter}"), 159new MockElementLocation($"taskParamLocation{stringCounter}"), 160new MockElementLocation($"conditionLocation{stringCounter}")); 182new MockElementLocation($"location{stringCounter}"), 183new MockElementLocation($"conditionLocation{stringCounter}"), 184new MockElementLocation($"inputsLocation{stringCounter}"), 185new MockElementLocation($"outputsLocation{stringCounter}"), 186new MockElementLocation($"returnsLocation{stringCounter}"), 187new MockElementLocation($"kdoLocation{stringCounter}"), 188new MockElementLocation($"dotLocation{stringCounter}"), 189new MockElementLocation($"btLocation{stringCounter}"), 190new MockElementLocation($"atLocation{stringCounter}"),