Skip to content

Commit

Permalink
Merge pull request #851 from square/rick/remove_parentheses_inside_ba…
Browse files Browse the repository at this point in the history
…ckticks

remove illegal characters inside backticks in tests
  • Loading branch information
RBusarow authored Jul 29, 2022
2 parents 3b8833b + a9a8dbb commit 7b124cd
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
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

0 comments on commit 7b124cd

Please sign in to comment.