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

Consolidate test validation #6

Open
stuebingerb opened this issue Oct 16, 2024 · 0 comments
Open

Consolidate test validation #6

stuebingerb opened this issue Oct 16, 2024 · 0 comments
Labels
input wanted Target solution is not yet clear or more input is wanted on an issue

Comments

@stuebingerb
Copy link
Owner

stuebingerb commented Oct 16, 2024

Currently, validations in test functions are implemented in different ways:

  • Using kluent, e.g.
    invoking {
        deserialize(schema.executeBlocking("{b{id, name, age}}"))
    } shouldThrow GraphQLError::class withMessage "Property id on B does not exist"
    
  • Using custom implementations, e.g.
    expect<IllegalAccessException>("ILLEGAL ACCESS") {
        schema.executeBlocking("{black_mamba {item}}", context = context { +"LAKERS" }).also(::println)
    }
    
  • Using hamcrest, e.g.
    assertThat(scenarioType["author"], nullValue())
    

This makes it unnecessarily complex and hard to maintain and should be consolidated, ideally towards a single, kotlin-native test library.

Ideas for alternatives:

@stuebingerb stuebingerb added the input wanted Target solution is not yet clear or more input is wanted on an issue label Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
input wanted Target solution is not yet clear or more input is wanted on an issue
Projects
None yet
Development

No branches or pull requests

1 participant