Improve diagnostics in GradleInspectionTest
This commit is contained in:
+12
-13
@@ -32,7 +32,7 @@ class GradleInspectionTest : GradleImportingTestCase() {
|
|||||||
fun testDifferentStdlibGradleVersion() {
|
fun testDifferentStdlibGradleVersion() {
|
||||||
val problems = getInspectionResultFromTestDataProject()
|
val problems = getInspectionResultFromTestDataProject()
|
||||||
|
|
||||||
Assert.assertTrue(problems.size == 1)
|
Assert.assertEquals(1, problems.size)
|
||||||
Assert.assertEquals("Plugin version (1.0.2) is not the same as library version (1.0.3)", problems.single())
|
Assert.assertEquals("Plugin version (1.0.2) is not the same as library version (1.0.3)", problems.single())
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@ class GradleInspectionTest : GradleImportingTestCase() {
|
|||||||
fun testDifferentStdlibGradleVersionWithImplementation() {
|
fun testDifferentStdlibGradleVersionWithImplementation() {
|
||||||
val problems = getInspectionResultFromTestDataProject()
|
val problems = getInspectionResultFromTestDataProject()
|
||||||
|
|
||||||
Assert.assertTrue(problems.size == 1)
|
Assert.assertEquals(1, problems.size)
|
||||||
Assert.assertEquals("Plugin version (1.0.2) is not the same as library version (1.0.3)", problems.single())
|
Assert.assertEquals("Plugin version (1.0.2) is not the same as library version (1.0.3)", problems.single())
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -48,7 +48,7 @@ class GradleInspectionTest : GradleImportingTestCase() {
|
|||||||
fun testDifferentStdlibJre7GradleVersion() {
|
fun testDifferentStdlibJre7GradleVersion() {
|
||||||
val problems = getInspectionResultFromTestDataProject()
|
val problems = getInspectionResultFromTestDataProject()
|
||||||
|
|
||||||
Assert.assertTrue(problems.size == 1)
|
Assert.assertEquals(1, problems.size)
|
||||||
Assert.assertEquals("Plugin version (1.1.0-beta-17) is not the same as library version (1.1.0-beta-22)", problems.single())
|
Assert.assertEquals("Plugin version (1.1.0-beta-17) is not the same as library version (1.1.0-beta-22)", problems.single())
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,7 +56,7 @@ class GradleInspectionTest : GradleImportingTestCase() {
|
|||||||
fun testDifferentStdlibJdk7GradleVersion() {
|
fun testDifferentStdlibJdk7GradleVersion() {
|
||||||
val problems = getInspectionResultFromTestDataProject()
|
val problems = getInspectionResultFromTestDataProject()
|
||||||
|
|
||||||
Assert.assertTrue(problems.size == 1)
|
Assert.assertEquals(1, problems.size)
|
||||||
Assert.assertEquals("Plugin version (1.1.0-beta-17) is not the same as library version (1.1.0-beta-22)", problems.single())
|
Assert.assertEquals("Plugin version (1.1.0-beta-17) is not the same as library version (1.1.0-beta-22)", problems.single())
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -64,7 +64,7 @@ class GradleInspectionTest : GradleImportingTestCase() {
|
|||||||
fun testDifferentStdlibGradleVersionWithVariables() {
|
fun testDifferentStdlibGradleVersionWithVariables() {
|
||||||
val problems = getInspectionResultFromTestDataProject()
|
val problems = getInspectionResultFromTestDataProject()
|
||||||
|
|
||||||
Assert.assertTrue(problems.size == 1)
|
Assert.assertEquals(1, problems.size)
|
||||||
Assert.assertEquals("Plugin version (1.0.1) is not the same as library version (1.0.3)", problems.single())
|
Assert.assertEquals("Plugin version (1.0.1) is not the same as library version (1.0.3)", problems.single())
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -74,7 +74,7 @@ class GradleInspectionTest : GradleImportingTestCase() {
|
|||||||
tool.testVersionMessage = "\$PLUGIN_VERSION"
|
tool.testVersionMessage = "\$PLUGIN_VERSION"
|
||||||
val problems = getInspectionResultFromTestDataProject(tool)
|
val problems = getInspectionResultFromTestDataProject(tool)
|
||||||
|
|
||||||
Assert.assertTrue(problems.size == 1)
|
Assert.assertEquals(1, problems.size)
|
||||||
Assert.assertEquals(
|
Assert.assertEquals(
|
||||||
"Kotlin version that is used for building with Gradle (1.0.1) differs from the one bundled into the IDE plugin (\$PLUGIN_VERSION)",
|
"Kotlin version that is used for building with Gradle (1.0.1) differs from the one bundled into the IDE plugin (\$PLUGIN_VERSION)",
|
||||||
problems.single()
|
problems.single()
|
||||||
@@ -84,15 +84,14 @@ class GradleInspectionTest : GradleImportingTestCase() {
|
|||||||
@Test
|
@Test
|
||||||
fun testJreInOldVersion() {
|
fun testJreInOldVersion() {
|
||||||
val problems = getInspectionResultFromTestDataProject()
|
val problems = getInspectionResultFromTestDataProject()
|
||||||
|
Assert.assertTrue("The inspection result should be empty but contains the following elements: [$problems].", problems.isEmpty())
|
||||||
Assert.assertTrue(problems.isEmpty())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun testJreIsDeprecated() {
|
fun testJreIsDeprecated() {
|
||||||
val problems = getInspectionResultFromTestDataProject()
|
val problems = getInspectionResultFromTestDataProject()
|
||||||
|
|
||||||
Assert.assertTrue(problems.size == 1)
|
Assert.assertEquals(1, problems.size)
|
||||||
Assert.assertEquals(
|
Assert.assertEquals(
|
||||||
"kotlin-stdlib-jre7 is deprecated since 1.2.0 and should be replaced with kotlin-stdlib-jdk7",
|
"kotlin-stdlib-jre7 is deprecated since 1.2.0 and should be replaced with kotlin-stdlib-jdk7",
|
||||||
problems.single()
|
problems.single()
|
||||||
@@ -103,7 +102,7 @@ class GradleInspectionTest : GradleImportingTestCase() {
|
|||||||
fun testJreIsDeprecatedWithImplementation() {
|
fun testJreIsDeprecatedWithImplementation() {
|
||||||
val problems = getInspectionResultFromTestDataProject()
|
val problems = getInspectionResultFromTestDataProject()
|
||||||
|
|
||||||
Assert.assertTrue(problems.size == 1)
|
Assert.assertEquals(1, problems.size)
|
||||||
Assert.assertEquals(
|
Assert.assertEquals(
|
||||||
"kotlin-stdlib-jre7 is deprecated since 1.2.0 and should be replaced with kotlin-stdlib-jdk7",
|
"kotlin-stdlib-jre7 is deprecated since 1.2.0 and should be replaced with kotlin-stdlib-jdk7",
|
||||||
problems.single()
|
problems.single()
|
||||||
@@ -115,7 +114,7 @@ class GradleInspectionTest : GradleImportingTestCase() {
|
|||||||
fun testJreIsDeprecatedWithoutImplicitVersion() {
|
fun testJreIsDeprecatedWithoutImplicitVersion() {
|
||||||
val problems = getInspectionResultFromTestDataProject()
|
val problems = getInspectionResultFromTestDataProject()
|
||||||
|
|
||||||
Assert.assertTrue(problems.size == 1)
|
Assert.assertEquals(1, problems.size)
|
||||||
Assert.assertEquals(
|
Assert.assertEquals(
|
||||||
"kotlin-stdlib-jre8 is deprecated since 1.2.0 and should be replaced with kotlin-stdlib-jdk8",
|
"kotlin-stdlib-jre8 is deprecated since 1.2.0 and should be replaced with kotlin-stdlib-jdk8",
|
||||||
problems.single()
|
problems.single()
|
||||||
@@ -126,14 +125,14 @@ class GradleInspectionTest : GradleImportingTestCase() {
|
|||||||
fun testNoDifferentStdlibCommonGradleVersion() {
|
fun testNoDifferentStdlibCommonGradleVersion() {
|
||||||
val problems = getInspectionResultFromTestDataProject()
|
val problems = getInspectionResultFromTestDataProject()
|
||||||
|
|
||||||
Assert.assertTrue(problems.toString(), problems.isEmpty())
|
Assert.assertTrue("The inspection result should be empty but contains the following elements: [$problems].", problems.isEmpty())
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun testNoDifferentStdlibJdk7GradleVersion() {
|
fun testNoDifferentStdlibJdk7GradleVersion() {
|
||||||
val problems = getInspectionResultFromTestDataProject()
|
val problems = getInspectionResultFromTestDataProject()
|
||||||
|
|
||||||
Assert.assertTrue(problems.toString(), problems.isEmpty())
|
Assert.assertTrue("The inspection result should be empty but contains the following elements: [$problems].", problems.isEmpty())
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
Reference in New Issue
Block a user