Skip to content

Commit

Permalink
Update doc on new VerificationChain
Browse files Browse the repository at this point in the history
  • Loading branch information
bitPogo committed Apr 26, 2022
1 parent 2555533 commit dce7446
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 13 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ toc::[]
* `allowInterfaces`, which combines `allowInterfacesOnKmock` and `allowInterfacesOnKspy`
* `disableFactories` in order to disable the generation of `kmock` and `kspy` if needed
* `customAnnotationsForMeta` to provide a hook for the usage of customized annotation for meta/shared sources
* `assertOrder` in order to make the names more consistent and which should be used to validate a total linear order of Proxies
* `assertOrder` in order to make the names more consistent and preserves the old behaviour of `verifyStrictOrder`

=== Changed

Expand All @@ -49,11 +49,11 @@ toc::[]
* Non intrusive behaviour (spy & relaxation) is now resolved by proxy invocation rather then by proxy initialisation in order to cover edge cases
* Assertion-/VerificationChain is not coupled any longer directly to proxies and provide improved error messages
* Expectation-methods do not bleed into the global context any longer
* `verifyStrictOrder` is now used for total order of certain Proxies but allows partial order between different Proxies

=== Deprecated

* `uselessPrefixes` in the Gradle Extension
* `verifyStrictOrder` use `assertOrder` instead

=== Removed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ import kotlin.test.Test
class PlatformDecoderSpec {
@Test
fun doSomething() {
TODO()
// TODO
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class Asserter(coverAllInvocations: Boolean = false) : AsserterBase(coverAllInvo
}

/**
*
* Alias to Asserter.
* @author Matthias Geisler
*/
typealias Verifier = Asserter
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class NonFreezingAsserter(coverAllInvocations: Boolean = false) : AsserterBase(c
}

/**
*
* Alias to NonFreezingAsserter.
* @author Matthias Geisler
*/
typealias NonFreezingVerifier = NonFreezingAsserter
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ fun <T> runAssertion(
fun Asserter.assertOrder(action: ChainedAssertion.() -> Any) = runAssertion(AssertionChain(references), action)

/**
* Alias of assertOrder.
* Verifies a chain of Expectations. Expectation between different proxies can contain gaps.
* Also the chain does not need to be exhaustive.
* @param action chain of Expectation Methods.
* @throws AssertionError if given criteria are not met.
* @see assertOrder
* @author Matthias Geisler
*/
fun Asserter.verifyStrictOrder(action: ChainedAssertion.() -> Any) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ package tech.antibytes.kmock.verification
import kotlinx.atomicfu.atomic
import kotlinx.atomicfu.update
import tech.antibytes.kmock.KMockContract
import tech.antibytes.kmock.KMockContract.FunProxy
import tech.antibytes.kmock.KMockContract.PropertyProxy
import tech.antibytes.kmock.KMockContract.Proxy
import tech.antibytes.kmock.KMockContract.AssertionChain
import tech.antibytes.kmock.KMockContract.CALL_NOT_FOUND
import tech.antibytes.kmock.KMockContract.CALL_WITH_ARGS_NOT_FOUND
import tech.antibytes.kmock.KMockContract.ChainedAssertion
import tech.antibytes.kmock.KMockContract.FunProxy
import tech.antibytes.kmock.KMockContract.ILLEGAL_VALUE
import tech.antibytes.kmock.KMockContract.MISSING_INVOCATION
import tech.antibytes.kmock.KMockContract.NOT_GET
import tech.antibytes.kmock.KMockContract.NOT_PART_OF_CHAIN
import tech.antibytes.kmock.KMockContract.NOT_SET
import tech.antibytes.kmock.KMockContract.PropertyProxy
import tech.antibytes.kmock.KMockContract.Proxy
import tech.antibytes.kmock.KMockContract.VOID_FUNCTION
import tech.antibytes.kmock.util.format

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ package tech.antibytes.kmock.verification
import tech.antibytes.kmock.KMockContract
import tech.antibytes.kmock.KMockContract.Proxy
import tech.antibytes.kmock.KMockContract.Reference
import tech.antibytes.kmock.fixture.fixtureVerificationHandle
import tech.antibytes.kmock.fixture.funProxyFixture
import tech.antibytes.kmock.fixture.propertyProxyFixture
import tech.antibytes.mock.AssertionsStub
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ import tech.antibytes.kmock.KMockContract.GetOrSet
import tech.antibytes.kmock.KMockContract.Reference
import tech.antibytes.kmock.fixture.funProxyFixture
import tech.antibytes.kmock.fixture.propertyProxyFixture
import tech.antibytes.mock.AssertionsStub
import tech.antibytes.util.test.fixture.fixture
import tech.antibytes.util.test.fixture.kotlinFixture
import tech.antibytes.util.test.fixture.listFixture
import tech.antibytes.util.test.fulfils
import tech.antibytes.util.test.mustBe
import kotlin.js.JsName
Expand Down

0 comments on commit dce7446

Please sign in to comment.