Skip to content

Commit

Permalink
Move test support to the zipline-testing module (cashapp#1041)
Browse files Browse the repository at this point in the history
* Move test support to the zipline-testing module

The endpoints testing utility was in the production module
because I didn't know I could face god and walk backwards into
hell by suppressing visibility warnings.

* Spotless and apiDump
  • Loading branch information
squarejesse authored Jun 12, 2023
1 parent a4061ee commit cdf14af
Show file tree
Hide file tree
Showing 7 changed files with 238 additions and 299 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import app.cash.zipline.testing.EchoRequest
import app.cash.zipline.testing.EchoResponse
import app.cash.zipline.testing.EchoZiplineService
import app.cash.zipline.testing.GenericEchoService
import app.cash.zipline.testing.ZiplineTestInternals
import assertk.assertThat
import assertk.assertions.contains
import assertk.assertions.containsExactly
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@file:Suppress(
// Access :zipline internals.j
"CANNOT_OVERRIDE_INVISIBLE_MEMBER",
"EXPOSED_FUNCTION_RETURN_TYPE",
"EXPOSED_PARAMETER_TYPE",
"INVISIBLE_MEMBER",
"INVISIBLE_REFERENCE",
)

package app.cash.zipline.testing

import app.cash.zipline.internal.EndpointService
Expand All @@ -26,7 +35,7 @@ import kotlinx.serialization.modules.SerializersModule

/** Returns a pair of endpoints connected to each other for testing. */
@JvmOverloads
internal fun newEndpointPair(
fun newEndpointPair(
scope: CoroutineScope,
serializersModule: SerializersModule = EmptySerializersModule(),
listenerA: Endpoint.EventListener = Endpoint.EventListener(),
Expand Down
Loading

0 comments on commit cdf14af

Please sign in to comment.