There's a problem with StatusCodeAssertions.expecting() method which is causing compiler errors when users pass in integer literals directly to StatusCodeAssertions.expecting().
When this happens, compilation fails because there are two ambiguous expecting() methods: one which takes Integer objects and one which takes int primitives. The initial tests didn't catch this because in StatusCodeAssertionsTest I had wrapped some repeated code into a method testAssertion() which takes int primitives: this would resolve the ambiguity for the compiler.
However, we can't expect users to do what I did in the test; most of the time, users will supply literals directly into the method. We have to resolve this issue by removing one of the ambiguous expecting() methods.
P.S.: We have to resolve this before we can release Bastion version 1.0 for sure because this will require public API changes.
There's a problem with
StatusCodeAssertions.expecting()
method which is causing compiler errors when users pass in integer literals directly toStatusCodeAssertions.expecting()
.When this happens, compilation fails because there are two ambiguous
expecting()
methods: one which takesInteger
objects and one which takesint
primitives. The initial tests didn't catch this because inStatusCodeAssertionsTest
I had wrapped some repeated code into a methodtestAssertion()
which takesint
primitives: this would resolve the ambiguity for the compiler.However, we can't expect users to do what I did in the test; most of the time, users will supply literals directly into the method. We have to resolve this issue by removing one of the ambiguous
expecting()
methods.P.S.: We have to resolve this before we can release Bastion version
1.0
for sure because this will require public API changes.