Skip to content

Commit

Permalink
Add client/server prefixes to test classes
Browse files Browse the repository at this point in the history
  • Loading branch information
jdisanti committed Dec 20, 2022
1 parent c608a77 commit 5c73370
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import software.amazon.smithy.rust.codegen.core.smithy.generators.BuilderGenerat
import software.amazon.smithy.rust.codegen.core.smithy.generators.implBlock
import software.amazon.smithy.rust.codegen.core.testutil.EventStreamTestRequirements

abstract class EventStreamBaseRequirements : EventStreamTestRequirements<ClientCodegenContext> {
abstract class ClientEventStreamBaseRequirements : EventStreamTestRequirements<ClientCodegenContext> {
override fun createCodegenContext(
model: Model,
serviceShape: ServiceShape,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ class MarshallTestCasesProvider : ArgumentsProvider {
.map { Arguments.of(it) }.stream()
}

class EventStreamMarshallerGeneratorTest {
class ClientEventStreamMarshallerGeneratorTest {
@ParameterizedTest
@ArgumentsSource(MarshallTestCasesProvider::class)
fun test(testCase: EventStreamTestModels.TestCase) {
EventStreamTestTools.runTestCase(
testCase,
object : EventStreamBaseRequirements() {
object : ClientEventStreamBaseRequirements() {
override fun renderGenerator(
codegenContext: ClientCodegenContext,
project: TestEventStreamProject,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ class UnmarshallTestCasesProvider : ArgumentsProvider {
EventStreamTestModels.TEST_CASES.map { Arguments.of(it) }.stream()
}

class EventStreamUnmarshallerGeneratorTest {
class ClientEventStreamUnmarshallerGeneratorTest {
@ParameterizedTest
@ArgumentsSource(UnmarshallTestCasesProvider::class)
fun test(testCase: EventStreamTestModels.TestCase) {
EventStreamTestTools.runTestCase(
testCase,
object : EventStreamBaseRequirements() {
object : ClientEventStreamBaseRequirements() {
override fun renderGenerator(
codegenContext: ClientCodegenContext,
project: TestEventStreamProject,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import software.amazon.smithy.rust.codegen.server.smithy.ServerCodegenContext
import software.amazon.smithy.rust.codegen.server.smithy.testutil.serverTestCodegenContext
import software.amazon.smithy.rust.codegen.server.smithy.testutil.serverTestRustSettings

abstract class EventStreamBaseRequirements : EventStreamTestRequirements<ServerCodegenContext> {
abstract class ServerEventStreamBaseRequirements : EventStreamTestRequirements<ServerCodegenContext> {
abstract val publicConstrainedTypes: Boolean

override fun createCodegenContext(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ class MarshallTestCasesProvider : ArgumentsProvider {
.map { Arguments.of(it) }.stream()
}

class EventStreamMarshallerGeneratorTest {
class ServerEventStreamMarshallerGeneratorTest {
@ParameterizedTest
@ArgumentsSource(MarshallTestCasesProvider::class)
fun test(testCase: EventStreamTestModels.TestCase) {
EventStreamTestTools.runTestCase(
testCase,
object : EventStreamBaseRequirements() {
object : ServerEventStreamBaseRequirements() {
override val publicConstrainedTypes: Boolean get() = true

override fun renderGenerator(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ class UnmarshallTestCasesProvider : ArgumentsProvider {
}.map { Arguments.of(it) }.stream()
}

class EventStreamUnmarshallerGeneratorTest {
class ServerEventStreamUnmarshallerGeneratorTest {
@ParameterizedTest
@ArgumentsSource(UnmarshallTestCasesProvider::class)
fun test(testCase: TestCase) {
EventStreamTestTools.runTestCase(
testCase.eventStreamTestCase,
object : EventStreamBaseRequirements() {
object : ServerEventStreamBaseRequirements() {
override val publicConstrainedTypes: Boolean get() = testCase.publicConstrainedTypes

override fun renderGenerator(
Expand Down

0 comments on commit 5c73370

Please sign in to comment.