Skip to content

Commit

Permalink
[rider] Introduce SolutionApiFacade instead of BaseTestWithSolutionBase
Browse files Browse the repository at this point in the history
- BaseTestWithSolutionBase was deleted, all withSolution functions are in the new ScriptingAPI.Solution
- Custom solution preparations (except Unreal) were replaced by facades (Folder, Template, Existing)
- Extension functions for BaseTestWithSolutionBase were replaced with extensions for BaseTest<*> or SolutionApiFacade
- EditorTestBase, ProjectModelBaseTest and other class were refactored with using SolutionApiFacade

GitOrigin-RevId: 64e324fc01e3f4f7ed468ab0a4d4e1caaaae303b
  • Loading branch information
Konstantin343 authored and auduchinok committed Aug 22, 2024
1 parent da66f99 commit 94ca635
Showing 1 changed file with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import com.jetbrains.rider.test.asserts.shouldBe
import com.jetbrains.rider.test.base.EditorTestBase
import com.jetbrains.rider.test.env.Environment
import com.jetbrains.rider.test.env.dotNetSdk
import com.jetbrains.rider.test.facades.RiderSolutionApiFacade
import com.jetbrains.rider.test.facades.solution.SolutionApiFacade
import com.jetbrains.rider.test.framework.frameworkLogger
import com.jetbrains.rider.test.scriptingApi.restoreNuGet
import java.io.File
Expand Down Expand Up @@ -101,13 +103,17 @@ abstract class FantomasDotnetToolTestBase : EditorTestBase() {
}
}

override fun openSolution(solutionFile: File, params: OpenSolutionParams): Project {
application.protocolManager.protocolHosts.forEach {
editFSharpBackendSettings(it) {
dotnetCliHomeEnvVar = getDotnetCliHome().absolutePathString()
override val solutionApiFacade: SolutionApiFacade by lazy {
object : RiderSolutionApiFacade() {
override fun openSolution(solutionFile: File, params: OpenSolutionParams): Project {
application.protocolManager.protocolHosts.forEach {
editFSharpBackendSettings(it) {
dotnetCliHomeEnvVar = getDotnetCliHome().absolutePathString()
}
}
return super.openSolution(solutionFile, params)
}
}
return super.openSolution(solutionFile, params)
}

override fun beforeDoTestWithDocuments() {
Expand Down

0 comments on commit 94ca635

Please sign in to comment.