Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove illegal characters inside backticks in tests #851

Merged
merged 1 commit into from
Jul 29, 2022
Merged
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 @@ -31,20 +31,20 @@ import kotlin.test.fail
*/
internal class ChainedWorkflowInterceptorTest {

@Test fun `chained() returns Noop when list is empty`() {
@Test fun `chained returns Noop when list is empty`() {
val list = emptyList<WorkflowInterceptor>()
val chained = list.chained()
assertSame(NoopWorkflowInterceptor, chained)
}

@Test fun `chained() returns single element when list size is 1`() {
@Test fun `chained returns single element when list size is 1`() {
val interceptor = object : WorkflowInterceptor {}
val list = listOf(interceptor)
val chained = list.chained()
assertSame(interceptor, chained)
}

@Test fun `chained() returns chained element when list size is 2`() {
@Test fun `chained returns chained element when list size is 2`() {
val list = listOf(
object : WorkflowInterceptor {},
object : WorkflowInterceptor {}
Expand All @@ -54,7 +54,7 @@ internal class ChainedWorkflowInterceptorTest {
}

@OptIn(ExperimentalCoroutinesApi::class)
@Test fun `chains calls to onInstanceStarted() in left-to-right order`() {
@Test fun `chains calls to onInstanceStarted in left-to-right order`() {
val events = mutableListOf<String>()
val interceptor1 = object : WorkflowInterceptor {
override fun onSessionStarted(
Expand Down Expand Up @@ -87,7 +87,7 @@ internal class ChainedWorkflowInterceptorTest {
assertEquals(listOf("started1", "started2", "cancelled1", "cancelled2"), events)
}

@Test fun `chains calls to onInitialState() in left-to-right order`() {
@Test fun `chains calls to onInitialState in left-to-right order`() {
val interceptor1 = object : WorkflowInterceptor {
override fun <P, S> onInitialState(
props: P,
Expand Down Expand Up @@ -128,7 +128,7 @@ internal class ChainedWorkflowInterceptorTest {
assertEquals("r1: r2: (props2: props1: props|snap2: snap1: snap)", finalState)
}

@Test fun `chains calls to onPropsChanged() in left-to-right order`() {
@Test fun `chains calls to onPropsChanged in left-to-right order`() {
val interceptor1 = object : WorkflowInterceptor {
override fun <P, S> onPropsChanged(
old: P,
Expand Down Expand Up @@ -173,7 +173,7 @@ internal class ChainedWorkflowInterceptorTest {
assertEquals("s1: s2: (old2: old1: old|new2: new1: new|state2: state1: state)", finalState)
}

@Test fun `chains calls to onRender() in left-to-right order`() {
@Test fun `chains calls to onRender in left-to-right order`() {
val interceptor1 = object : WorkflowInterceptor {
override fun <P, S, O, R> onRender(
renderProps: P,
Expand Down Expand Up @@ -269,7 +269,7 @@ internal class ChainedWorkflowInterceptorTest {
assertEquals("START uno, START dos, END dos, END uno", transcript.joinToString(", "))
}

@Test fun `chains calls to onSnapshotState() in left-to-right order`() {
@Test fun `chains calls to onSnapshotState in left-to-right order`() {
val interceptor1 = object : WorkflowInterceptor {
override fun <S> onSnapshotState(
state: S,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,7 @@ internal class WorkflowNodeTest {
assertEquals("props:new props|state:initial props", restoredNode.render(workflow, "foo"))
}

@Test fun `toString() formats as WorkflowInstance without parent`() {
@Test fun `toString formats as WorkflowInstance without parent`() {
val workflow = Workflow.rendering(Unit)
val node = WorkflowNode(
id = workflow.id(key = "foo"),
Expand All @@ -719,7 +719,7 @@ internal class WorkflowNodeTest {
)
}

@Test fun `toString() formats as WorkflowInstance with parent`() {
@Test fun `toString formats as WorkflowInstance with parent`() {
val workflow = Workflow.rendering(Unit)
val node = WorkflowNode(
id = workflow.id(key = "foo"),
Expand Down Expand Up @@ -775,7 +775,7 @@ internal class WorkflowNodeTest {
assertSame(cause, cancellationException)
}

@Test fun `interceptor handles initialState()`() {
@Test fun `interceptor handles initialState`() {
lateinit var interceptedProps: String
lateinit var interceptedSnapshot: Snapshot
lateinit var interceptedState: String
Expand Down Expand Up @@ -817,7 +817,7 @@ internal class WorkflowNodeTest {
assertEquals(42, interceptedSession.parent!!.sessionId)
}

@Test fun `interceptor handles onPropsChanged()`() {
@Test fun `interceptor handles onPropsChanged`() {
lateinit var interceptedOld: String
lateinit var interceptedNew: String
lateinit var interceptedState: String
Expand Down Expand Up @@ -866,7 +866,7 @@ internal class WorkflowNodeTest {
assertEquals(42, interceptedSession.parent!!.sessionId)
}

@Test fun `interceptor handles render()`() {
@Test fun `interceptor handles render`() {
lateinit var interceptedProps: String
lateinit var interceptedState: String
lateinit var interceptedRendering: String
Expand Down Expand Up @@ -911,7 +911,7 @@ internal class WorkflowNodeTest {
assertEquals(42, interceptedSession.parent!!.sessionId)
}

@Test fun `interceptor handles snapshotState()`() {
@Test fun `interceptor handles snapshotState`() {
lateinit var interceptedState: String
var interceptedSnapshot: Snapshot? = null
lateinit var interceptedSession: WorkflowSession
Expand Down Expand Up @@ -952,7 +952,7 @@ internal class WorkflowNodeTest {
assertEquals(42, interceptedSession.parent!!.sessionId)
}

@Test fun `interceptor handles snapshotState() returning null`() {
@Test fun `interceptor handles snapshotState returning null`() {
lateinit var interceptedState: String
var interceptedSnapshot: Snapshot? = null
lateinit var interceptedSession: WorkflowSession
Expand Down