Commit graph

9 commits

Author SHA1 Message Date
Sipke Schoorstra cea453cb4f Fix unit tests 2021-09-16 20:34:32 +02:00
Sipke Schoorstra 37d687d526 Update names according to convention 2021-09-16 20:26:18 +02:00
Sipke Schoorstra ce957b95e7 Cleanup 2021-04-07 13:13:13 +02:00
Craig Fowler 282c90f80f Further fixup & refactoring of Autofixture attribs
This now also includes reworking the attribute which activates
Autofixture-style resolution upon an IServiceProvider.
This has now been renamed to WithAutofixtureResolutionAttribute.

The new/reworked attribute is composable with other Autofixture
attributes.
2021-04-02 13:28:27 +01:00
Craig Fowler 088cf7fdf6 Merge remote-tracking branch 'elsa-core/feature/elsa-2.0' into 751-postgres-yessql-exception 2021-04-02 11:14:16 +01:00
Craig Fowler d285b8b505 WIP composing customize attributes
This isn't really related to #751 - it's a refactor of some of
our test logic, to avoid bloat of semi-repeated autofixture
customization attributes.

By switching to a behaviour-driven model, it's possible to
compose them, which means that there's no need to part-duplicate
between them.  It should also reduce the overall number of them,
as combinations can be put together on-demand, rather than needing
a new attribute of their own.
2021-04-02 11:12:21 +01:00
Craig Fowler dd9c1f5cdc WIP #761 - Unit test indicates location of problem
This unit test narrows the problem down to the class
JavaScriptService.
2021-04-01 20:25:09 +02:00
Craig Fowler 1dee17b904 WIP #738 - Add test coverage for new service
This test passes, but as you can see it's
massive because of the complexity of what the
class has to do.
2021-03-18 18:54:23 +00:00
Craig Fowler b583c7f1a9
Resolves #485 - Add PurgeVariables functionality (#654)
* Trivial - Add VS Code workspace

* Trivial - Add VSCode build task & extra ignore

On GNU/Linux, auto-generated .directory
files should be ignored.

* WIP #485 - Boilerplate for unit test project

* WIP #485 - Add test coverage (Remove/RemoveAll)

* WIP #485 - Implement RemoveAll

* Remove redundant logic, covered by IDictionary

Per the following, the contract for a generic IDictionary,
the Remove method already deals with non-existent keys.

  https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.idictionary-2.remove?view=net-5.0#System_Collections_Generic_IDictionary_2_Remove__0_

* Resolve #485 - Add PurgeVariables methods

These are convenience methods upon ActivityExecutionContext
and WorkflowExecutionContext, consistent with their current APIs.

Also in this commit are tests for those simple methods.
There's a bit of test-scaffold as well included, such as:
* Autofixture Xunit2 integration
* New project for unit tests
* Customize attribute for avoiding crashes on Autofixture recursion
* Reusable specimen builder for creating IServiceProvider which
  resolves services from Autofixture
* Custonize attribute for a parameter to use that ^^ specimen builder
2021-02-24 14:29:03 +01:00