Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
package com.facebook.react.tasks.internal

import com.facebook.react.tests.createTestTask
import org.junit.Assert.assertEquals
import org.assertj.core.api.Assertions.assertThat
import org.junit.Rule
import org.junit.Test
import org.junit.rules.TemporaryFolder
Expand All @@ -22,6 +22,6 @@ class BuildCodegenCLITaskTest {
val bashPath = tempFolder.newFile("bash").absolutePath
val task = createTestTask<BuildCodegenCLITask> { it.bashWindowsHome.set(bashPath) }

assertEquals(bashPath, task.bashWindowsHome.get())
assertThat(task.bashWindowsHome.get()).isEqualTo(bashPath)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ package com.facebook.react.tasks.internal
import com.facebook.react.tests.createProject
import com.facebook.react.tests.createTestTask
import java.io.*
import org.junit.Assert.*
import org.assertj.core.api.Assertions.assertThat
import org.junit.Rule
import org.junit.Test
import org.junit.rules.TemporaryFolder
Expand Down Expand Up @@ -43,7 +43,7 @@ class PrepareGlogTaskTest {
}
task.taskAction()

assertTrue(output.listFiles()!!.any { it.name == "CMakeLists.txt" })
assertThat(output.listFiles()!!.any { it.name == "CMakeLists.txt" }).isTrue()
}

@Test
Expand All @@ -63,7 +63,7 @@ class PrepareGlogTaskTest {
}
task.taskAction()

assertTrue(output.listFiles()!!.any { it.name == "config.h" })
assertThat(output.listFiles()!!.any { it.name == "config.h" }).isTrue()
}

@Test
Expand All @@ -83,7 +83,7 @@ class PrepareGlogTaskTest {

task.taskAction()

assertTrue(File(output, "glog-1.0.0/src/glog.cpp").exists())
assertThat(File(output, "glog-1.0.0/src/glog.cpp").exists()).isTrue()
}

@Test
Expand All @@ -104,8 +104,8 @@ class PrepareGlogTaskTest {
task.taskAction()

val expectedFile = File(output, "glog.h")
assertTrue(expectedFile.exists())
assertEquals("ac_google_start_namespace", expectedFile.readText())
assertThat(expectedFile.exists()).isTrue()
assertThat(expectedFile.readText()).isEqualTo("ac_google_start_namespace")
}

@Test
Expand All @@ -125,6 +125,6 @@ class PrepareGlogTaskTest {

task.taskAction()

assertTrue(File(output, "exported/glog/logging.h").exists())
assertThat(File(output, "exported/glog/logging.h").exists()).isTrue()
}
}