Skip to content

Commit

Permalink
[rider] Replace @TestEnvironment(solution) with @Solution
Browse files Browse the repository at this point in the history
GitOrigin-RevId: 5d9a5140b2b02097bb462088d0c135e441dd07b6
  • Loading branch information
Konstantin343 authored and auduchinok committed Aug 24, 2024
1 parent 90e7214 commit d590b4a
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,13 @@ class FSharpHoverDocTest : DocumentationTestBase() {
fun `test multiple frameworks`() = doTest("Program.fs", "Program.fs")

@Test
@TestEnvironment(
solution = "SwaggerProviderCSharp",
sdkVersion = SdkVersion.DOT_NET_6
)
@TestEnvironment(sdkVersion = SdkVersion.DOT_NET_6)
@Solution("SwaggerProviderCSharp")
fun `provided method in csharp`() = doTest("CSharpLibrary.cs", "CSharpLibrary.cs")

@Test
@TestEnvironment(
solution = "SwaggerProviderCSharp",
sdkVersion = SdkVersion.DOT_NET_6
)
@TestEnvironment(sdkVersion = SdkVersion.DOT_NET_6)
@Solution("SwaggerProviderCSharp")
fun `provided abbreviation in csharp`() = doTestWithTypeProviders("OpenAPI Provider for")

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ package com.jetbrains.rider.plugins.fsharp.test.cases.projectModel

import com.jetbrains.rd.ide.model.RdDndOrderType
import com.jetbrains.rider.plugins.fsharp.test.fcsHost
import com.jetbrains.rider.test.annotations.Issue
import com.jetbrains.rider.test.annotations.Issues
import com.jetbrains.rider.test.annotations.Mute
import com.jetbrains.rider.test.annotations.TestEnvironment
import com.jetbrains.rider.test.annotations.*
import com.jetbrains.rider.test.base.ProjectModelBaseTest
import com.jetbrains.rider.test.env.enums.SdkVersion
import com.jetbrains.rider.test.framework.TestProjectModelContext
Expand Down Expand Up @@ -51,10 +48,8 @@ class FSharpProjectModelTest : ProjectModelBaseTest() {

@Test
@Mute("RIDER-110482")
@TestEnvironment(
solution = "FSharpProjectTree",
sdkVersion = SdkVersion.DOT_NET_5
)
@TestEnvironment(sdkVersion = SdkVersion.DOT_NET_5)
@Solution("FSharpProjectTree")
fun testFSharpProjectStructure() {
doTestDumpProjectsView {
dump2("Init", false, false) {
Expand Down Expand Up @@ -182,10 +177,8 @@ class FSharpProjectModelTest : ProjectModelBaseTest() {
}

@Test
@TestEnvironment(
solution = "FsprojWithTwoFiles",
sdkVersion = SdkVersion.DOT_NET_5
)
@TestEnvironment(sdkVersion = SdkVersion.DOT_NET_5)
@Solution("FsprojWithTwoFiles")
fun testManualFsprojChange() {
doTestDumpProjectsView {
dump2("Init", false, false) { }
Expand All @@ -203,10 +196,8 @@ class FSharpProjectModelTest : ProjectModelBaseTest() {
}

@Test(description = "RIDER-107198")
@TestEnvironment(
solution = "SolutionWithDuplicateTargets",
sdkVersion = SdkVersion.DOT_NET_5
)
@TestEnvironment(sdkVersion = SdkVersion.DOT_NET_5)
@Solution("SolutionWithDuplicateTargets")
fun doNoneItemDuplicatesTest() {
doTestDumpProjectsView {
dump2("Init", checkSlnFile = false, compareProjFile = false) { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,8 @@ class TypeProvidersCSharpTest : BaseTypeProvidersTest() {
}

@Test
@TestEnvironment(
solution = "SwaggerProviderCSharp",
sdkVersion = SdkVersion.DOT_NET_6
)
@TestEnvironment(sdkVersion = SdkVersion.DOT_NET_6)
@Solution("SwaggerProviderCSharp")
fun changeStaticArg() {
withOpenedEditor(project, "CSharpLibrary/CSharpLibrary.cs", "CSharpLibrary.cs") {
waitForDaemon()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import com.jetbrains.rdclient.testFramework.waitForDaemon
import com.jetbrains.rider.daemon.util.hasErrors
import com.jetbrains.rider.plugins.fsharp.test.fcsHost
import com.jetbrains.rider.test.annotations.Mute
import com.jetbrains.rider.test.annotations.Solution
import com.jetbrains.rider.test.annotations.TestEnvironment
import com.jetbrains.rider.test.asserts.shouldBeFalse
import com.jetbrains.rider.test.asserts.shouldBeTrue
Expand All @@ -23,9 +24,9 @@ class TypeProvidersRuntimeTest : BaseTypeProvidersTest() {
@TestEnvironment(
sdkVersion = SdkVersion.DOT_NET_CORE_3_1,
buildTool = BuildTool.FULL,
platform = [PlatformType.WINDOWS_ALL],
solution = "TypeProviderLibrary"
platform = [PlatformType.WINDOWS_ALL]
)
@Solution("TypeProviderLibrary")
fun framework461() = doTest(".NET Framework 4.8")

@Test
Expand All @@ -45,10 +46,8 @@ class TypeProvidersRuntimeTest : BaseTypeProvidersTest() {
fun net7() = doTest(".NET 7")

@Mute("RIDER-103648")
@TestEnvironment(
sdkVersion = SdkVersion.DOT_NET_CORE_3_1,
solution = "FscTypeProviderLibrary"
)
@TestEnvironment(sdkVersion = SdkVersion.DOT_NET_CORE_3_1)
@Solution("FscTypeProviderLibrary")
fun fsc() = doTest(".NET Framework 4.8")

private fun doTest(expectedRuntime: String) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,18 @@ class TypeProvidersTest : BaseTypeProvidersTest() {
@Test
@Mute("RIDER-111885", platforms = [PlatformType.LINUX_ALL, PlatformType.MAC_OS_ALL])
@TestEnvironment(
solution = "CsvTypeProvider",
sdkVersion = SdkVersion.DOT_NET_6,
buildTool = BuildTool.SDK
)
@Solution("CsvTypeProvider")
fun `csvProvider - units of measure`() = doTest("Library")

@Test(description = "RIDER-101544")
@TestEnvironment(
solution = "SwaggerProviderCSharp",
sdkVersion = SdkVersion.DOT_NET_6,
buildTool = BuildTool.SDK
)
@Solution("SwaggerProviderCSharp")
fun `srtp analysis`() {
withOpenedEditor(project, "SwaggerProviderLibrary/SwaggerProvider.fs", "SwaggerProvider.fs") {
waitForDaemon()
Expand Down

0 comments on commit d590b4a

Please sign in to comment.