Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #9
Fixture
wasn't able to produce a value for collections unless it was registered already. I thought of two ways to handle this more generically:Element
(orKey
&Value
) were already registered, we could return a collection with a single element of those types (this keeps things non-deterministic)I was going to bake custom behaviour into
Fixture.value(for:overrides:)
but I instead opted to just makeArray
,Set
andDictionary
conform toFixtureProviding
. I was a bit on the fence about this since I didn't really want to conform system types to the public protocol (which is why we have the registration system in the first place) but the only other option was to have a separate similar internal protocol and that didn't make sense either.Since this is a system type, and it's a protocol that we own, I don't see that adding
FixtureProviding
conformance ourselves is such a big problem. If it becomes one in the future though, we can revisit for sure.