Skip to content

Tags: surajp/universalmock

Tags

v0.9.1-beta

Toggle v0.9.1-beta's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fixes for mutators and addition of sequential mutators (#24)

* Fix chaining issue for mutateWith

And add the ability to mutateUntil a specific call count.

* Update package.json

* Make mutator behavior consistent with return value behavior

`Mutatewith` mutators will only be applied after all previous
`mutateUntil` calls are done. Mutators with the same value of
`mutateUntil` will be accumulated and applied in succession. Also
updated README.

v0.9-beta

Toggle v0.9-beta's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Sequential mocks new (#23)

* Add ability to mock multiple return values

Ability for the same method to be mocked with a different return value
each time can be useful in mocking utility methods, selector classes,
etc. We use a separate map to keep track of mocks based on method call
count so in the future we can potentially extend this algorithm to
support additional conditions for mocking

* Move reset calls to beginning of chain

Instead of the end of method call chains as it is clearer and easier to
keep track of

* Add tests for returnUntil with param types

* Update Readme

v0.4

Toggle v0.4's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Add support for async contexts (#17)

In async calls, since the mock instance being used is a copy of the
original instance, the state is not preserved outside the async context.
This commit addresses the issue. We store a map of all Umock instances
in a static map, keyed by a guid, and copy the current instance to the map
after each method call. The subsequent verification methods uses the instance
stored in the static map instead of the current instance.

Change all occurences of `isTest` to `IsTest` to conform with Java style guides
for annotations. Update Readme to note async behavior support.

v0.3

Toggle v0.3's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Add better autocomplete support (#14)

* WIP: Add better autocomplete support

Use inner classes to offer better autocomplete support. The inner
classes only expose methods that are valid at any point in the fluent
api chain.

* Remove unused methods and variables

These methods were being used to ensure the methods are called in the
right order. We no longer need these since we are using inner classes.

* Remove redundant inner class instances

* Make inner class constructors private

* Remove unused message

* Adding final to several inner class properties (#13)

* Change inner classes' naming scheme

Name inner classes '_Entry','_Midway' and '_Exit'. Not thrilled about
the naming scheme but rolling out with this for now. Could possibly
change later, but won't affect the api.

* Change UM apex class version to 53.0

Co-authored-by: James Simone <[email protected]>

v0.2

Toggle v0.2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Added shorter wasCalled(int) method (#11)

added wasCalled(int)

* updated readme

Co-authored-by: John Ellison <[email protected]>

v0.1-alpha

Toggle v0.1-alpha's commit message
update github action